Skip to content

XPath Memory problem #179

@fcichos

Description

@fcichos

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions