I have some XML and an XPath query. I'm using Yahoo! widgets, so I'm using XPath 1.0.
Here's the gist of my XML...
<root>
<cat num="SOURCE">
<movie>
<swf>speak.swf</swf>
<width>250</width>
<height>150</height>
<colour>cccccc</colour>
</movie>
<movie>
...
If I have XML like:
<foo>
<bar id="1" score="192" />
<bar id="2" score="227" />
<bar id="3" score="105" />
...
</foo>
Can I use XPath to find the minimum and maximum values of score?
Edit: The tool i'm using (Andariel ant tasks) doesn't support the XPath 2.0 solution.
...
For example : this is an xslt
<xsl:template match="/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_1
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_2
|/root/sub-root/parent/child/grand_child/dummy1/dummy2/dummy3/dummy4/node_3
.
.
|/root/sub-root/parent/child/grand_child/dummy1/dummy2...
Let's say I have this document.
<a:Root>
<a:A>
<title><a:B/></title>
<a:C>
<item><a:D/></item>
</a:C>
</a:A>
</a:Root>
And I have an XmlNode set to the <a:A> element.
If I say
A.SelectNodes( "//a:*", namespaceManager )
I get B, C, and D. But I don't want D because it's nested in another...
Given a document containing these tags, how can I tell whether " " < "H" < "z" in the document's encoding? I'm trying to do this in XPath 1.0.
<text>H</text>
<range>
<from> </from>
<to>z</to>
</range>
I might even be able to get away with using contains(), but then how would I create a string containing the characters from "...