I have an XML file with content like this:
<Node id="7"/>
www
<Node id="10"/>
How is it possible using XML::LibXML and Perl to take the content between the two nodes, ie "www"?
Thank you.
I have an XML file with content like this:
<Node id="7"/>
www
<Node id="10"/>
How is it possible using XML::LibXML and Perl to take the content between the two nodes, ie "www"?
Thank you.
The XML format that you have deal with is awful!*
Given a node, you want the nodes that are its siblings, immediately follow it (except perhaps for intermediary comments) and are text nodes.
* —
www
should be a child ofNode
. For example,<Node id="7">www</Node>
would be better.