2
我有以下類:如何在C#中使用xmlserializer自定義xml?
public class DisplayFunction
{
[System.Xml.Serialization.XmlAttribute()]
public byte[] Color
{
get;
set;
}
[System.Xml.Serialization.XmlAttribute()]
public FunctionShape Shape
{
get;
set;
}
[System.Xml.Serialization.XmlAttribute()]
public int Id
{
get;
set;
}
}
我使用XML序列化和獲得的結果:
<DisplayFunctions Color="et57hQ==" Shape="Bar" Id="514" />
,而我希望得到的結果是:
<DisplayFunctions Color="122,222,123,133" Shape="Bar" Id="514" />
哪有我得到那個結果?
http://stackoverflow.com/questions/1075860/c-sharp-custom-xml-serialization,http://stackoverflow.com/questions/3109827/custom-xml-serialization ,http://stackoverflow.com/questions/10292084/custom-xml-serialization – WhiteKnight 2012-04-26 09:10:27