xpath for children

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • helpful sql

    xpath for children

    Hi all,
    Following is a part of an Xml document I am having problems with. I have
    a XmlNode variable in my C# application that referes to the mytable node of
    the following Xml. Now I need to get all children of mytable node from the
    ns0 namespace(myfie ld1 and myfield2 in this case) using the XmlNode object.
    I need a help with Xpath query to achieve this.

    Do you think the following statement would work?
    mytablenode.Sel ectNodes("desce ndant::ns0:*",m ynamespacemanag er);



    <ns0:mydatase t>
    <ns0:mytable>
    <w:p>
    <ns0:myfield1>v alue</ns0:myfield1>
    </w:p>
    <w:p>
    <ns0:myfield2>v alue</ns0:myfield2>
    </w:p>
    </ns0:mytable>
    </ns0:mydataset>


    Thanks in advance.


Working...