Tag: XML
-
Reading XML file through LINQ: few Tips
In this post I will discuss how could be read XML file using LINQ. We will see some tips as well. Let us say we have XML file as below, this file is stored on D drive. This XML contains information about books. Data.Xml Fetching all the Books To fetch all the Books,…
-
LINQ to XML Part #2(XElement Class)
Objective In this article, I will give explanation on XElement class. This class is used to construct XML Elements.What is Elements in XML? XML Element is fundamental XML constructs. An Element has a name and optional attributes. An XML Elements can have nested Elements called Nodes also. XElement class XElement Class is defined as below…
-
LINQ to XML Part #1(XAttribute Class)
Objective In this article, I will give explanation on XAttribute class. This class is used to construct Attributes in XML Elements. What is Attribute in XML? XML Attribute is a Name/Value pair associated with XML elements. XAttribute class represents XML Attributes. XAttribute class XAttribute Class is defined as below in namespace System.Xml.Linq. And it inherits…
-
Creating XML Tree from Scratch through LINQ
Objective: This article is going to explain, How to create XML Tree using LINQ? This will be explaining Functional Construction way of creating XML tree. There are three samples given in this article. One for basic XML tree construction, one to construct from array of objects and last to construct XML tree from content of…