G
Guest
Hi...
I was trying to deserialize objects from xml that contain a couple of
arrays. In the xml, at least, I was trying to express some default/static
members to the array as attributes on the array bracket (e.g.
....
<Foobars defaultFoo="bar">
<Foobar>Foo</Foobar>
<Foobar></Foobar>
</Foobars>
....
and in the class to be deserialized I have
public Foobar[] Foobars {}
)
I was experimenting with [XmlAnyAttribute], [XmlAttribute], etc and I found
that the attribute defaultFoo just vaporizes. It doesn't show up in the
any-attribute array for the container class nor does it show up in the
unknown attributes array for the Foobar instances.
Ideally, what I'd like to have happen is to direct defaultFoo directed into
public class Foobar
{
public static string defaultFoo;
}
but at the moment I'm not having luck getting it to show up anywhere.
Any pointers?
Thanks
Mark
I was trying to deserialize objects from xml that contain a couple of
arrays. In the xml, at least, I was trying to express some default/static
members to the array as attributes on the array bracket (e.g.
....
<Foobars defaultFoo="bar">
<Foobar>Foo</Foobar>
<Foobar></Foobar>
</Foobars>
....
and in the class to be deserialized I have
public Foobar[] Foobars {}
)
I was experimenting with [XmlAnyAttribute], [XmlAttribute], etc and I found
that the attribute defaultFoo just vaporizes. It doesn't show up in the
any-attribute array for the container class nor does it show up in the
unknown attributes array for the Foobar instances.
Ideally, what I'd like to have happen is to direct defaultFoo directed into
public class Foobar
{
public static string defaultFoo;
}
but at the moment I'm not having luck getting it to show up anywhere.
Any pointers?
Thanks
Mark