how i essence an xml component controlling xmlserializer?
i have an xml reader xml string:
<?xml version="1.0" encoding="utf-8" ?>
<story id="1224488641nl21535800" date="20 oct 2008" time="07:44">
<title>press digest - portugal - oct 20</title>
<text>
<p> lisbon, oct 20 (reuters) - following main
stories portuguese newspapers monday. reuters not
verified stories does attest accuracy. </p>
<p>more html things here</p>
</text>
</story>
i combined an xsd analogous category deserialization.
[system.xml.serialization.xmlrootattribute(namespace="", isnullable=false)]
public category story {
[system.xml.serialization.xmlattributeattribute()]
open twine id;
[system.xml.serialization.xmlattributeattribute()]
open twine date;
[system.xml.serialization.xmlattributeattribute()]
open twine time;
open twine title;
open twine text;
}
i following emanate an instance category controlling deserialize slight xmlserializer.
xmlserializer ser = new xmlserializer(typeof(story));
return (story)ser.deserialize(xr);
now, text member story always null. i change story category xml parsed expected?
edit:
using an xmltext does work i have control over xml i'm parsing.
Comments
Post a Comment