Using namespace and import it : Namespace « XML « VB.Net






Using namespace and import it

  

Imports System
Imports System.Xml
Imports System.Xml.XPath
Imports <xmlns:aw="http://www.domain.com">

Module Module1
    Sub Main()
        Dim xmlTree As XElement = _
            <aw:Root>
                <aw:Child1>1</aw:Child1>
                <aw:Child2>2</aw:Child2>
                <aw:Child3>3</aw:Child3>
                <aw:Child4>4</aw:Child4>
                <aw:Child5>5</aw:Child5>
            </aw:Root>

        Dim elements = From el In xmlTree.Elements _
                       Where el.Value <= 3 _
                       Select el

        For Each el In elements
            Console.WriteLine(el)
        Next
    End Sub
End Module

   
    
  








Related examples in the same category

1.Import namespace
2.XName.Namespace Property gets the namespace part of the fully qualified name.
3.Get declared namespace