123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|579|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Basic Basement -> vb.net xml parsing?

Sat, 24 Apr 2010, 03:53
spinal
I have had a look on the net, but i can't seem to get any examples i find to work properly

Basically, I want to grab the imURL, imageNumber and romCRC extension=".nds" values from the following xml file and drop them into a listview box.

(there would be a few thousand entries for 'game'


Does anyone have an example to hand for doing this?

-=-=-
Check out my excellent homepage!
Sat, 24 Apr 2010, 04:15
Jayenkai


Might need a bit of tweaking to get the string length right! I usually bugger that up, first time around

Basically, just treat it as a plain text file. XML's nothing special, and shouldn't be treated as if it is.. It's just formatted "Better"
...
Although my version of "Better" would be...



because A, it's more readable, and B, it's using half the damn space, because everything's not bloody well repeated.

-=-=-
''Load, Next List!''
Sat, 24 Apr 2010, 04:55
JL235
I would not advise Jay's method, it doesn't verify the XML is well-formed (and do something appropriate if it's not).

Instead you could take a look at using the XMLDocument class, and I expect there is a lot more you can use too in system.xml.
Sat, 24 Apr 2010, 04:59
Jayenkai
It's a preformatted Database -> XML output thing, it's always formatted like that and is simple enough that there are no real errors. There might be occasional "other data" bits, or even "missing data" bits, but otherwise it'll be the same through and through.

See Advanscene for further details..

-=-=-
''Load, Next List!''
Sat, 24 Apr 2010, 06:11
spinal
I have always had a hatred for xml, mostly because there is way too much bloat. It seems to me that 95% of the time an .ini file will do the job much smaller, quicker and easier.

However, this file is downloaded from some place and I have no say in the format.


-=-=-
Check out my excellent homepage!
Sat, 24 Apr 2010, 06:28
JL235
Jayenkai It's a preformatted Database -> XML output thing, it's always formatted like that and is simple enough that there are no real errors.
Doesn't guarantee it'll always be formatted correctly.

Second, if there is a class that does this already in the .NET framework then why build your own hackish bit of simple string concatonation? Just use the libraries, they are there and ready to use!