please anyone can help to convert xml to json form textbox

Breit

New Member
hey guys please anyone help me in this code i'm using C# to get xml from textBox and store it in string i want to convert it to json when i use XmlDocument for example XmlDocument doc = new XmlDocment();when i use doc.loadXml(string); i have here error cald unhandledException this is my code \[code\] string xml2 = XMLResult.Text; XmlDocument doc = new XmlDocument(); doc.LoadXml(xml2); string jsonText = JsonConvert.SerializeXmlNode(doc); JSONResult.Text = JSONResult.Text + jsonText.ToString();\[/code\]
 
Back
Top