C# XML Read with an application example
All tutorials created in C# to be posted in here.
1 post
Page 1 of 1
Hello and welcome to my how to read and phrase xml tutorial
Alright to start we are going to be needing to use namespace:
Using System.Xml;
Now create a new instance of the XmlDocumet
We will display the content from the node in a messagebox
feel free to post here if you need any help =D
Here is a practical application showing the use ='D
Alright to start we are going to be needing to use namespace:
Using System.Xml;
Now create a new instance of the XmlDocumet
Code: Select all
XmlDocument xdoc = new XmlDocumnet();
Code: Select all
Now create a string and store the url of the Xml file/websitexdoc.load(url);
Code: Select all
Alright now We need to select the nodes that we need:string url = http://imdbapi.org/?title=The Walking Dead&type=xml&plot=full&episode=0&limit=1&yg=0&mt=none&lang=en-
US&offset=&aka=full&release=full&business=0&tech=0
We will display the content from the node in a messagebox
Code: Select all
This is the basic way to read XML i will post another tutorial sometime next week =D // Selects node title form node item witch is in the main node IMDBDocumentList
MessageBox.Show(xdoc.SelectSingleNode("IMDBDocumentList/item/title").InnerText;
feel free to post here if you need any help =D
Here is a practical application showing the use ='D
You do not have the required permissions to view the files attached to this post.
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023