Load xml document with XDocument in CSharp

Description

The following code shows how to load xml document with XDocument.

Example


    /*w  ww .  j  a  v  a 2 s. c  o m*/
using System;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.IO;


public class MainClass{

   public static void Main(string[] args){   
       XDocument ThisDoc = new XDocument();
       ThisDoc = XDocument.Load("Test.XML");

   }
}




















Home »
  C# Tutorial »
    XML »




Load Parse
Document
Element
Attribute
Namespace
Query
Save
Schema
Style