Answers for "CONVERT AN XML STRING TO A C# OBJECT"

C#
1

string to xml c#

string test = "<body><head>test header</head></body>";

XmlDocument xmltest = new XmlDocument();
xmltest.LoadXml(test);

XmlNodeList elemlist = xmltest.GetElementsByTagName("head");

string result = elemlist[0].InnerXml; 

//result -> "test header"
Posted by: Guest on December-21-2020

Code answers related to "CONVERT AN XML STRING TO A C# OBJECT"

C# Answers by Framework

Browse Popular Code Answers by Language