Create an XML tree with nested namespaces : XML Tree « XML « VB.Net






Create an XML tree with nested namespaces

 


Imports System
Imports System.Xml
Imports System.Xml.XPath

Public Class MainClass

    Public Shared Sub Main()

        Dim root As XDocument = _ 
            <?xml version='1.0'?>
            <Root xmlns='http://www.domain.com'>
                <Child xmlns='www.AnotherDomain.com'>
                <DifferentChild xmlns='http://www.domain.com'>other content</DifferentChild>
                </Child>
            </Root>
        Console.WriteLine(root)

    End Sub
End Class

   
  








Related examples in the same category

1.Use Tree to Display XML document
2.Create an XML tree in a namespace
3.Create an XML tree with nested namespaces
4.XStreamingElement represents elements in an XML tree that supports deferred streaming output.