c# xmldocument from file
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("your file path");
c# xmldocument from file
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("your file path");
xmldocument to c# object
void Main()
{
String aciResponseData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><tag><bar>test</bar></tag>";
using(TextReader sr = new StringReader(aciResponseData))
{
var serializer = new System.Xml.Serialization.XmlSerializer(typeof(MyClass));
MyClass response = (MyClass)serializer.Deserialize(sr);
Console.WriteLine(response.bar);
}
}
[System.Xml.Serialization.XmlRoot("tag")]
public class MyClass
{
public String bar;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us