0
是否有可能得到RestSharp反序列化这个Xml代码片段,到一个类,而不是两个类?RestSharp如何反序列化此Xml?
<shippingInfo>
<shippingServiceCost currencyId="AUD">58.02</shippingServiceCost>
<shippingType>Flat</shippingType>
<shipToLocations>Worldwide</shipToLocations>
</shippingInfo>
注意第一个元素shippingServiceCost
?它在那里有一个属性。通常,我会创建一个名为ShippingServiceCost
的子类,并在其中添加两个属性:CurrentId
和Value
。
但它有可能有一个属性中的CurrencyId值,在主类ShippingInfo
?