Hi all, I have a problem with my xml model. I want to get the child nodes of a parent node and then save the children in a collection. Is there any way to ignore the node "C" and take only the child nodes? I dont want to have a class called "C" with "D" children.
The A node is not the root of my file.
I use the XmlSerializer from Microsoft to deserialize my model.
Thanks in advance!
<A>
<B>
<C>
<D>
<E/>
</D>
<D>
<E/>
</D>
</C>
</B>
</A>
[XmlRoot("A")]
public class Root
{
[XmlElement("B")]
public B BNode {get;set;}
}
public class B
{
[XmlArray("C")]
public D[] DNodes {get;set;}
}