select all nodes with same namespace

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ckoch
    New Member
    • May 2007
    • 2

    #1

    select all nodes with same namespace

    If this is my xml, how do I select all nodes with the same prefix? ie. I want to do a doc.selectnodes and get all nodes that are in the ns0 namespace. selectnodes doesn't seem to do it or I can't figure out what the right xpath would be. Using vb.net, vs2005.

    Code:
    <w:wordDocument .....
     xmlns:ns0="http://tempuri.org/mystuff0.xsd"
     xmlns:ns1="http://tempuri.org/mystuff1.xsd"
    ... />
    
    <ns0:Company></ns0:Company>
    <ns1:State></ns1:State>
    <ns1:Zip></ns1:Zip>
Working...