[System.Xml.Xsl.Serialization.Xsl.Sort("asc")]
Imagine I want to serialize a class to xml using the FileStream and XmlSerializer, no problem, but what if I want to sort my nodes upon serializing my class. This could probably be done using the XPathNavigator and XslTransform. But perhaps a more neat way would be to mark the node with this non existing attribute [System.Xml.Xsl.Serialization.Xsl.Sort("asc")]
I need this feature in .NET a.s.a.p :-).
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.jcsharp.net/2003/x/y/")]
[System.Xml.Serialization.XmlRootAttribute("xmltest", Namespace="http://www.jcsharp.net/2003/x/y/", IsNullable=false)]
public class xmltext {
/// remarks
// [System.Xml.Xsl.Serialization.Xsl.Sort("asc")] <-- I WOULD LOVE TO SEE SUCH A FEATURE HERE.
[System.Xml.Serialization.XmlArrayAttribute(ElementName = "Authors", IsNullable = false)]
[System.Xml.Serialization.XmlArrayItemAttribute("Books", Type = typeof(System.String), IsNullable = false)]
public ArrayList Book;
}
"Ask, and it shall be given you; Seek, and ye shall find; Knock, and it shall be opened unto you"
7:22:48 PM
|