D
Duncan
Can I use the contains() function within an xpath query to return a
node whose attribute contains some text?
Something like: selectNodes("//Dataset[@Pattern contains(@Pattern,
'xyz')]
so for the given xml doc
<root>
<Datasets>
<Dataset name="dataset1" Pattern="abc" AnotherAttribute="xyz"/>
<Dataset name="dataset2" Pattern="xyz" AnotherAttribute="xyz"/>
<Dataset name="dataset3" Pattern="vwxyz"/>
</Datasets>
</root>
The nodes dataset2 and dataset3 would be returned because their
'Pattern' attribute contains the text 'xyz'.
Many thanks,
Duncan.
node whose attribute contains some text?
Something like: selectNodes("//Dataset[@Pattern contains(@Pattern,
'xyz')]
so for the given xml doc
<root>
<Datasets>
<Dataset name="dataset1" Pattern="abc" AnotherAttribute="xyz"/>
<Dataset name="dataset2" Pattern="xyz" AnotherAttribute="xyz"/>
<Dataset name="dataset3" Pattern="vwxyz"/>
</Datasets>
</root>
The nodes dataset2 and dataset3 would be returned because their
'Pattern' attribute contains the text 'xyz'.
Many thanks,
Duncan.