xml

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

What is the easiest way to get data from xml assuming that it confirms to
the default microsoft schema?

Thanks,
Matt
 
* "Matt said:
What is the easiest way to get data from xml assuming that it confirms to
the default microsoft schema?

Did you have a look at the classes provided in the 'System.Xml'
namespace. Which class you will have to use depends on what exactly you
want to do with the XML data.
 
Matt said:
What is the easiest way to get data from xml assuming that it confirms to
the default microsoft schema?

Use classes from System.XML

Example:

Dim objXML As New XmlDocument
Dim objNode As XmlNode

objXML.LoadXml(szXML)
objNode = objXML.SelectSingleNode("./NodeName")
....

Hope it helps.

sincerely,
--
Sebastian Zaklada
Skilled Software
http://www.skilledsoftware.com
************************************
SQL Source Control 2003 - for
SQL Server Source Safe integration
and custom databases documentation
 
Hi Matt,

The most easiest to use is for me the xml file configured as a dataset.
dataset.readxml(path)

After that you can choise for the sugestion from Blumido (DOM) or use the
XMLreader.

I prefer them to use in that sequence.

I hope this helps?

Cor
 
Cor said:
Hi Matt,

The most easiest to use is for me the xml file configured as a dataset.
dataset.readxml(path)

DataSets will not be appropriate in all situations - read below.
After that you can choise for the sugestion from Blumido (DOM) or use the
XMLreader.

Good suggestions here. To the original poster, there are performance
differences between the 2. The XmlReader is read-only and forward-only
whereas the DOM is not (somewhat similar to a DataReader vs. a DataSet in
ADO.NET if you are familiar with those objects.) If you have large XML
documents or you need to parse them quite often, this choice becomes even
more important.
 
Back
Top