Re: how to deserialize variable element/node




wpmccormick@xxxxxxxxx wrote:
Gadget wrote:
On 15 Nov 2006 19:28:42 -0800, wpmccormick@xxxxxxxxx wrote:

I've a complex problem:

I need to re-explain this ...

Whether I deserialize this:

<foo>
.......
<bar>sometimes a simple string is here</bar>
.......
</foo>


Or this:

<foo>
.......
<bar>
<zip>sometimes</zip>
<zap>more structure</zap>
<zoo>is here</zoo>
</bar>
.......
</foo>


I want to end up with an object

class foo {
string bar;
baz[] Baz;
}

class {
string zip;
string zap;
string zoo;
}

In the first deserialization case, bar = "sometimes a simple string is
here" and Baz is null. In the second bar is null and zip, zap and zoo
are filled in.

Thanks

.



Relevant Pages