This task was assigned to me , and i wrote a simple function to accomplish this in C#.Net 2.0
here is the code
private XmlDocument GetXMLDOC(string Path)
XmlDocument xdoc = new XmlDocument();
System.Net.WebClient wc = new System.Net.WebClient();
StreamReader sr = null;
string xml = null;
sr = new StreamReader(wc.OpenRead(Path));
xml = sr.ReadToEnd();
catch (Exception ex)
Now you get an XML Document in which XML data is loaded.
To traverse through this XML document we need a XML List and an XML node
string Pagepath = txtLink.Text;
XmlDocument xdoc = GetXMLDOC(Pagepath);
if (xdoc != null)
XmlNodeList nodeList = xdoc.GetElementsByTagName("any-XML-tag");
XmlNode Inode = nodeList;
when we get the XML node , we can get its data by using node.innerText property like this.
string mydata = Inode.InnerText;
thats it... you can use this generic method to fetch all kinds of records from any Xml file if you are given its link...
if you know any other and simpler method for the same purpose..kindly share it..
Can you find more than 20 defects in the below image? Write your defects in the comments section.
This post is a collection of JMeter Tutorials from the web. JMeter is a leading open source load testing tool which is widely used across ...
This is a two part series of test automation on android using Appium, C# and MSTest. for part 2 click here . Prerequisites for this tuto...
This is the second part of the series "Test automation on Android using Appium, C# and MSTest". If you missed the first part, Cli...