Get concatenated text contents of an element in CSharp

Description

The following code shows how to get concatenated text contents of an element.

Example


using System;//  w ww.ja va2 s . co m
using System.Linq;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;


public class MainClass{
   public static void Main(){

        XElement el = XElement.Parse("<Root>This is <b>mixed</b> content</Root>");
        Console.WriteLine("{0}", el.Value);
   }
}




















Home »
  C# Tutorial »
    XML »




Load Parse
Document
Element
Attribute
Namespace
Query
Save
Schema
Style