Hello,
I'm having some trouble with the xpath_eval() function.
I have a dom object, built on something like the following
<root>
<a id='1'>
<b name='foo' />
<b name='bar' />
<b name='bla' />
</a>
<a id='2'>
<b name='foo' />
<b name='bar' />
<b name='bla' />
</a>
</root>
I then create the xpath context, and try to run multiple xpath queries on it, something like
"/root/a[@id='1']/"
and then..
"/root/a[@id='2']/"
(to get all children of a with that id)
What's strange is that I'm not getting all the nodes back sometimes - sometimes I'm only getting the first child back.
So, <a id='1'> I get
<b name='foo' />
<b name='bar' />
<b name='bla' />
but <a id='2'> I get
<b name='foo' />
Has anyone had trouble with xpath_eval with not getting all the children back?
Thanks 🙂