Saturday, 22 September 2018
Tuesday, 18 September 2018
Converting Json Data to Xml Data:
Converting Json Data to Xml Data:
public void xmlSerialize()
{
string json = "{'total': 1, 'city': { 'name': 'Zaafaranah, Red Sea, Egypt, EG', 'dest_code': 'D!001031', 'country': 'EG', 'code': 'C!000001'} }";
System.Xml.XmlDocument xmlDocument = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(json, "city");
System.Xml.XmlTextWriter xmlTextWriter = new System.Xml.XmlTextWriter("json.xml", null);
xmlTextWriter.Formatting = System.Xml.Formatting.Indented;
xmlDocument.Save(xmlTextWriter);
}
public void xmlSerialize()
{
string json = "{'total': 1, 'city': { 'name': 'Zaafaranah, Red Sea, Egypt, EG', 'dest_code': 'D!001031', 'country': 'EG', 'code': 'C!000001'} }";
System.Xml.XmlDocument xmlDocument = Newtonsoft.Json.JsonConvert.DeserializeXmlNode(json, "city");
System.Xml.XmlTextWriter xmlTextWriter = new System.Xml.XmlTextWriter("json.xml", null);
xmlTextWriter.Formatting = System.Xml.Formatting.Indented;
xmlDocument.Save(xmlTextWriter);
}
Subscribe to:
Posts (Atom)
Top Agile Interview Questions & Answers
Top Agile Interview Questions & Answers 1. What is Agile Testing? The first question of agile interview question tests your k...
