XName
overloads the + operator, allowing you to combine a namespace and name without using braces.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Text;
using System.IO;
class Program
{
static void Main()
{
XNamespace ns = "http://domain.com/xmlspace";
XName fullName = ns + "customer";
Console.WriteLine(fullName); //{http://domain.com/xmlspace}customer
}
}
The output:
{http://domain.com/xmlspace}customer
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. |