• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

[vb.net] XMLdatareader and datasets

Saldrin

OSNN Junior Addict
#1
I'm using xmldatareader to parse an xml file and then bind data to either RTBs, datagrids and textboxes. I'm running into a problem with the xml schema, in which fields that contain an addition keyword won't get parsed/debugged/built. For example:

Code:
<keyword>value</keyword>
<keyword>
     <subKeyWord>value</subKeyWord>
     <subKeyWord>value</subKeyword>
</keyword>
The subkeyword errors out during the reading process. I'm getting an error about nested data within the dataset for the subKeyword values.

I'm using this to pull the data:

Code:
XMLDataSet = New DataSet
' Change location of XML file as necessary in next line
XMLDataSet.ReadXml("P:\projects\xmldata\XMLData.xml")
DataGrid.DataSource = XMLDataSet
' Tell the grid to display the Builder table initially
DataGrid.DataMember = "BuildInfo"
Everything works fine there after as long as my XMLdata.xml file is "linear". Any suggestions on a different method to parse data with "data within the data"?

Or suggest an alternate method of grabbing data from xml? I'm a basement programmer: AKA n00b, so please be gentle.
 

Saldrin

OSNN Junior Addict
#2
Not sure if anyone cares... but I fixed it woohoo!

Details: I scrapped the dataset construction. I instead dumped the xml file into an xmlDoc, and just called what I needed by using the xml nodes by use of the xmlreader.

If anyone is interested, I got the idea from a movie: http://www.microsoft.com/seminar/shared/asp/view.asp?url=/Seminar/en/20040312VBData06/manifest.xml&rate=1&WMPVer=9.0.0.3250

The movie demostrates the method in VS.net and was an interesting watch!

So um.... enjoy the movie.
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,013
Latest member
Pdawgintown