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'
zabalex 270004P7ES1 Post
Re: XPath Query to exclude descendent elements2011-10-17T17:44:12ZThis is the accepted answer. This is the accepted answer.Hi
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