Use an Xpath query on the XmlDataDocument
in xsl you could do
<xsl:tempate select="//entry[@index=$theindex">
do something
</xsl:template>
You could pass theindex up with a param object on your transform.
Or in code assuming the xml is store in a
XmlDataDocument object or other object that supports selectSingleNode
dim entryValue as string
entryValue=myxmldatadocument.selectSingleNode("//entry[@index=" & thenode &
"]").text
the XmlDataDocument is really slow for transforamtions though so you might
want to use a different object.
Cheers
Keith
"MT" <no****@nospam.com> wrote in message
news:uM**************@TK2MSFTNGP12.phx.gbl...
I have a gigantic XML file which has the following structure:
<root>
<header>
</header>
<entry index="1">asdf</entry>
<entry index="2">fdfsa</entry>
........
</root>
Now, I have a simple XSD defined that automatically generates a Dataset
for me. I use the MyDatabase.ReadXml method to read the xml into the Dataset.
It fills the correct DataTables and DataRows automatically. I think this is
an inefficient way of reading the XML.
Is there a way I can do a query into my file so I can just grab my entry
with index "x" instead of reading the entire document using ReadXML?
Thanks,
MT