[vb.net] XMLdatareader and datasets

Saldrin

OSNN Junior Addict
Joined
1 Dec 2005
Messages
31
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.
 
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 profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back