.Net Xml Serialization: how to collapse misc children nodes to text? -
.Net Xml Serialization: how to collapse misc children nodes to text? -
i'd utilize xmlserializer deserialize next structure:
<modules> <module name="1"> <config> <miscnodes1/> ... </config> </module> <module name="2"> someconfigstring1;someconfigstring2; </module> </modules> to .net classes that:
[xmlroot("modules")] class config { [xmlelement("module"); public list<module> modules { get; set; } } class module { [xmlattribute("name")] public string name { get; set; } [???] public string config { get; set; } } i'd collapse miscellaneous children nodes within ./modules/module string: "<config><miscnodes1/></module>" , "someconfigstring1;someconfigstring2;" (just if phone call innerxml element)
xmltext doesn't help me.
how can ?
thank in advance!
you can utilize xmlanyelement attribute on array of xmlnode, this: [xmlanyelement] public xmlnode[] config { get; set; }
.net xml-serialization
Comments
Post a Comment