Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- I need some ideas on XML parsing.....
December 30, 2006, 1:10 am
rate this thread
bit burned out...
I've got a piece of equipment that has data that I need to get.
The data is stored in "bytes" for lack of a better word, and I need to
parse it out according to an XML file format.
data is stored in rows like this:
uint From uint To uint bitmap
The row is defined by this bit of XML:
<items orientation="row" start="40079" inc="3"
<From format="n" />
Assume that I get a binary string, consisting of 6 bytes with the above
information. I have to create an array with the following elements:
From To auxA auxB auxC auxD
with the values parsed out of the 6 bytes according to the XML
definition. The XML can change if the data structure changes, so the
code has to parse the XML first, then create a format string, and
finally unpack the binary string.
I'm having a heck of a time getting a concept worked out for this. It
should be easy but I've been working on related bits of code for so long
that it all barely makes sense right now.... :-)
Anyway I would appreciate any suggestions on this.
And Happy New Year to all!
Re: I need some ideas on XML parsing.....
could match multiple rows.
2. I wonder if the item tag attribute that matches the structure of the
contained data is perhaps leading you to create dynamic structures?
Interesting. Is that parsed by XSL switch statements that use the
variant structure? Something tells me you may need a uniformly named
container for the object being defined therein?
I am fairly new to XSL so forgive me if I am barking up wrong trees