[xml] obtaining an XPath expression given a node ptr
- From: "Vakoc, Mark" <Mark_Vakoc jdedwards com>
- To: "'xml gnome org'" <xml gnome org>
- Subject: [xml] obtaining an XPath expression given a node ptr
- Date: Fri, 9 Nov 2001 16:13:40 -0700
given an xmlNodePtr in a document, is it possible to retrieve a xpath
expression that uniquely identifies that node?
i.e. a given document
<?xml version="1.0"?>
<root>
<a/>
<a><b/><b><c/></b></a>
</root>
And you had the xmlNodePtr to node 'C', you would receive back an xpath
expression of "/root/a[2]/b[2]/c"
?
Thanks.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]