Thanks in advance...
If i already have the result of this X path Query /root/listing/seller_info/seller_name
then how can i exclude this from the following query which is made on its ancestor? root/listing/seller_info
I tried /root/listing/seller_info but it fetches all the descendents of 'seller_info' including 'seller_name'
This topic has been locked.
1 reply Latest Post - 2011-10-17T17:44:12Z by zabalex
Pinned topic XPath Query to exclude descendent elements
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-10-17T17:44:12Z at 2011-10-17T17:44:12Z by zabalex
zabalex 270004P7ES1 PostACCEPTED ANSWER
Re: XPath Query to exclude descendent elements2011-10-17T17:44:12Z in response to ISHPKHi
First you need to Create an XMLDocument Object and the root of your XML path to Object.
then you create a XMLNode object and cast XMLDocument to XMLNode
Use the below Syntax:-
XMLDocument objdoc = new XMLDocument(Server.MapPath("xyz.xml");
XMLNode ObjNode = new XMLNode(objdoc);
XMLElement objElement = ObjNode("Full path of node");
string val = objElement.toString();
SEO San Francisco