XElement.Load (TextReader) loads an XElement from a TextReader. : Load Save « XML LINQ « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Date Time
8.Design Patterns
9.Development Class
10.Event
11.File Stream
12.Generics
13.GUI Windows Form
14.Internationalization I18N
15.Language Basics
16.LINQ
17.Network
18.Office
19.Reflection
20.Regular Expressions
21.Security
22.Services Event
23.Thread
24.Web Services
25.Windows
26.Windows Presentation Foundation
27.XML
28.XML LINQ
C# / C Sharp » XML LINQ » Load SaveScreenshots 
XElement.Load (TextReader) loads an XElement from a TextReader.
 
using System;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;


public class MainClass
{
    public static void Main()
    {
        TextReader sr = new StringReader("<Root><Child/></Root>");
        XElement xmlTree = XElement.Load(sr);
        sr.Close();
        Console.WriteLine(xmlTree);
    }
}

   
  
Related examples in the same category
1.XElement.Load loads an XElement from a file.
2.XElement.Load(String, LoadOptions) loads an XElement from a file
3.XElement.Load Method (TextReader, LoadOptions) loads an XElement from a TextReader
4.XElement.Load (XmlReader) loads an XElement from an XmlReader.
5.XElement.Save serializes this element to a file.
6.XElement.Save serializes this element to a file, optionally disabling formatting.
7.XElement.Save (TextWriter) serializes this element to a TextWriter.
8.XElement.Save (TextWriter, SaveOptions) serializes this element to a TextWriter
9.XElement.Save (XmlWriter) serializes this element to an XmlWriter.
10.XDocument.Load loads a XDocument from a file.
11.XDocument.Load(String, LoadOptions) loads an XDocument from a file with option
12.XDocument.Load (TextReader) creates a new XDocument from a TextReader.
13.XDocument.Load (TextReader, LoadOptions) loads an XDocument from a TextReader with option
14.XDocument.Load (XmlReader) loads an XDocument from an XmlReader.
15.XDocument.Load(XmlReader, LoadOptions) loads an XElement from an XmlReader with option
16.XDocument.Parse(String, LoadOptions) parse a string to create a new XDocument with option
17.XDocument.Save (String) serializes this XDocument to a file, overwriting an existing file, if it exists.
18.XDocument.Save (String, SaveOptions) serializes this XDocument to a file with option
19.XDocument.Save (TextWriter) serializes this XDocument to a TextWriter.
20.XDocument.Save (TextWriter, SaveOptions) serializes this XDocument to a TextWriter with option
21.XDocument.Save Method (XmlWriter) serializes this XDocument to an XmlWriter.
22.XDocument.Parse (String) parses a string to create a new XDocument.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.