M
Martin Z
Hi,
I'm trying to support a 3rd-party XML format for which there is no
schema. As such, I've been making my objects that map to their format
using the XMLSerializer... but there's one object that stops me.
We have a class called Abstract-A, and a collection of Abstract-As
we'll call A-List. One particular subtype of AbstractA is bothering
me, because it works like this:
<AList>
<D foo="foo" bar="bar"/>
<G foo="foo">quux</G>
<B>
<B-Child foo="foo"/>
<B-Child foo="bar"/>
</B>
</AList>
As you can see, the problem is B-child. I define AList as a list of
Abstract-A's, and D, G, and B as subtypes of Abstract-A. But B is a
list of B-Childs. I tried defining B's "XmlText" member as being a
list of B-Childs, but you can only apply XmlText to strings (or arrays
of strings).
Any help would be appreciated.
I'm trying to support a 3rd-party XML format for which there is no
schema. As such, I've been making my objects that map to their format
using the XMLSerializer... but there's one object that stops me.
We have a class called Abstract-A, and a collection of Abstract-As
we'll call A-List. One particular subtype of AbstractA is bothering
me, because it works like this:
<AList>
<D foo="foo" bar="bar"/>
<G foo="foo">quux</G>
<B>
<B-Child foo="foo"/>
<B-Child foo="bar"/>
</B>
</AList>
As you can see, the problem is B-child. I define AList as a list of
Abstract-A's, and D, G, and B as subtypes of Abstract-A. But B is a
list of B-Childs. I tried defining B's "XmlText" member as being a
list of B-Childs, but you can only apply XmlText to strings (or arrays
of strings).
Any help would be appreciated.