G
goldtech
given:
<links>
<l><a>1</a><n>Building</n></l>
<l><a>4</a><n>Community</n></l>
<l><a>2</a><n>Comedy</n></l>
<l><a>3</a><n>Computer</n></l>
</links>
What is an Xpath statement to find the maximum value in the "a"
element node. It would be 4. I have searched and tried many examples
with no luck. It must be simple? I could easily parse into an array
and use an array's max function but would like to learn the xpath way.
Help appreciated. I am using libxml2 in Python 2.6. I don't know if I
have Xpath 1.0 or 2.0(?)
Thanks,
Lee G.
<links>
<l><a>1</a><n>Building</n></l>
<l><a>4</a><n>Community</n></l>
<l><a>2</a><n>Comedy</n></l>
<l><a>3</a><n>Computer</n></l>
</links>
What is an Xpath statement to find the maximum value in the "a"
element node. It would be 4. I have searched and tried many examples
with no luck. It must be simple? I could easily parse into an array
and use an array's max function but would like to learn the xpath way.
Help appreciated. I am using libxml2 in Python 2.6. I don't know if I
have Xpath 1.0 or 2.0(?)
Thanks,
Lee G.