0
這裏實現IXmlSerializable的是XML:幫助與此XML
<?xml version="1.0" encoding="utf-8" ?>
<SAPPHIRE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TRANSACTION-CODE>NEW</TRANSACTION-CODE>
<CUSTOMER-NUMBER>100398598</CUSTOMER-NUMBER>
<CUSTOMER-NAME>CART DUDE</CUSTOMER-NAME>
<ACCOUNT-TYPE />
<PERSON FNAME="CART" LNAME="DUDE" RESPONSIBLITY="CART DUDE" />
<SOURCE>cplestore</SOURCE>
<TRAN-REFERENCE>13374470</TRAN-REFERENCE>
<ORDER>
<ORDER-NUMBER NUMBER="00241662693" REFERENCE="13374470">
<PRODUCT-CODE>DLP99022L</PRODUCT-CODE>
<START-DATE>2011-4-6 00:00:00.0</START-DATE>
<EXPIRE-DATE>2011-4-11 00:00:00.0</EXPIRE-DATE>
<MAX-USERS>1</MAX-USERS>
<ALLOWED-USERS>1</ALLOWED-USERS>
<PERSON FNAME="CART" LNAME="DUDE" RESPONSIBLITY="CART DUDE" />
</ORDER-NUMBER>
</ORDER>
</SAPPHIRE>
我有DTO爲:
public class Sapphire : IXmlSerializable
{
public XmlSchema GetSchema()
{
return null;
}
public void ReadXml(XmlReader reader)
{
throw new NotImplementedException();
}
public void WriteXml(XmlWriter writer)
{
throw new NotImplementedException();
}
}