broadbent
asked on
Reading XML
I don't know about everyone else, but I find the Help file in Visual Studio less than helpful, and no matter how I experiment, I can't find a way of reading an xml file through the VB Namespace xml.
I really wish to parse the file to return the value of some attribute or other -
- <Block name="fred">
<Handle>1234</Handle>
- <Attribute>
<Handle>2345</Handle>
<Tag>George</Tag>
<Value>likes to drink</Value>
</Attribute>
etc.
How do "I return likes to drink" given "George"
as an example
Thanks
I really wish to parse the file to return the value of some attribute or other -
- <Block name="fred">
<Handle>1234</Handle>
- <Attribute>
<Handle>2345</Handle>
<Tag>George</Tag>
<Value>likes to drink</Value>
</Attribute>
etc.
How do "I return likes to drink" given "George"
as an example
Thanks
Hi broadbent,
you need to learn xpath, for a good tutorial try http://www.w3schools.com/xpath/default.asp
as for your question
wait a mo
Cheers!
you need to learn xpath, for a good tutorial try http://www.w3schools.com/xpath/default.asp
as for your question
wait a mo
Cheers!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Actually, I've said to hell with xml.
Instead I read the whole file into a string, and then parse it myself. I am sure its much simpler and quicker.
Instead I read the whole file into a string, and then parse it myself. I am sure its much simpler and quicker.
ds.readXml("file.xml")