Link to home
Start Free TrialLog in
Avatar of broadbent
broadbentFlag for United Kingdom of Great Britain and Northern Ireland

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
Avatar of iboutchkine
iboutchkine

convert XML file to datset and then read dataset. It is the easiest way

ds.readXml("file.xml")
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!
ASKER CERTIFIED SOLUTION
Avatar of lengreen
lengreen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of broadbent

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.