C# multiple writeattributestring to xml not showing in correct order




xtw.WriteStartElement("cXML");
xtw.WriteAttributeString("payloadID", payloadidstr);
xtw.WriteAttributeString("timestamp", utctime());
xtw.WriteAttributeString("version", "1.2.024");


above code working fine to generate xml attribute. if open xml file in notepad shows the following string which is correct.


cXML payloadID="1392408819113-4172669982087053277@123.456.789.10" timestamp="2014-02-14T12:13:39-08:00" version="1.2.024"


but when open xml file in any browser the attribute order is changed showing like this.


cXML version="1.2.024" timestamp="2015-01-15T16:54:48-08:00" payloadID="150120150454480293-832257153@123.456.789.10"


Can someone let me know why browser not showing in correct order or how to shows multiple string under one element.


No comments:

Post a Comment