|
Hi monty,
thanks for your answers. The original question wasn't really aimed at
XPath, it was just an example, however you raise some important points
which I should keep in mind.
Now for the XPath itself, I seem to have run into a bug
Imagine xml
~~~~~~~~~
<?xml version="1.0" encoding="UTF-8"?>
<root>
<node id="a">
<node id="a.1" />
<node id="a.2" />
</node>
<node id="b">
<node id="b.1" />
<node id="b.2" />
</node>
</root>
~~~~~~~~~~~~~~~~
and an xpath '//node[position()=2]'
This should return collection containing nodes "b","a.2","b.2",
however in Pharo it returns collection with "a.1"
Is this something that can be easily fixed? If not I would prefer to
work around it than wait for fix.
Thanks,
Peter
|