in reply to Finding node with attribute XML::LibXML
relative to the root of the document (/) meansVolume[@VolumeCategory="L"]
/Volume[@VolumeCategory="L"]
They fail to find a match since there's no element named Volume at the root of the document.
/root/Volume[@VolumeCategory="L"]
would find the node in question, and so would its relative equivalent
root/Volume[@VolumeCategory="L"]
It's just like directories.
$ cd / $ ls -d ikegami ls: cannot access ikegami: No such file or directory $ ls -d /ikegami ls: cannot access /ikegami: No such file or directory $ ls -d /home/ikegami /home/ikegami $ ls -d home/ikegami home/ikegami
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding node with attribute XML::LibXML
by jjap (Monk) on Sep 30, 2014 at 18:06 UTC | |
by ikegami (Patriarch) on Sep 30, 2014 at 19:49 UTC | |
by Jim (Curate) on Oct 01, 2014 at 00:57 UTC | |
by ikegami (Patriarch) on Oct 01, 2014 at 16:09 UTC |