Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPath Memory problem #179

Open
fcichos opened this issue Jan 20, 2023 · 0 comments
Open

XPath Memory problem #179

fcichos opened this issue Jan 20, 2023 · 0 comments

Comments

@fcichos
Copy link

fcichos commented Jan 20, 2023

Hi,

I try to filter a larger XML dataset (Apple Health XML) to sort out some elements using the XPath, for example

doc = readxml("Export.xml");
t="HKQuantityTypeIdentifierBodyMassIndex"

While
elements=findall("//Record]", doc);

succeeds in finding all data records,

elements=findall("//Record[@type=t]", doc);

fails with

XMLError: Memory allocation failed : growing nodeset hit limit
 from XPath module (code: 2, line: 0)

Stacktrace:
 [1] throw_xml_error()
   @ EzXML ~/.julia/packages/EzXML/ZNwhK/src/error.jl:87
 [2] findall(xpath::String, node::EzXML.Node, ns::Vector{Pair{String, String}})
   @ EzXML ~/.julia/packages/EzXML/ZNwhK/src/xpath.jl:94
 [3] findall
   @ ~/.julia/packages/EzXML/ZNwhK/src/xpath.jl:76 [inlined]
 [4] findall(xpath::String, doc::EzXML.Document)
   @ EzXML ~/.julia/packages/EzXML/ZNwhK/src/xpath.jl:43
 [5] top-level scope
   @ In[61]:2

Is this an issue of the xpath.jl or am I wrongly applying XPath?

Thanks
Frank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant