I have a XML file with several <text>
nodes. Each text node has attributes named "top" and "left" and has a child node named <textValue>
. This XML file basically represents the coordinate positions of text in a PDF file that has been converted to XML using a PDF2HTML converter.
I want to parse the XML file using conditions such as:
1. Give me all the consecutive nodes in the XML file that have the same "top" attribute. - Here. I am trying to get all nodes that have the same "top" attribute, but may have different "left" attribute value.
Which XML parser supports these kinds of queries? I am familiar with basic DOM parser that just allows me to iterate through the elements and access its attribute value. Is there any XML parser that allows conditional queries to be written on top of it?
Thanks