Re: [xml] SelectSingleNode
- From: Daniel Veillard <veillard redhat com>
- To: "Paul B. Cameron" <paul b cameron kepware com>
- Cc: xml gnome org
- Subject: Re: [xml] SelectSingleNode
- Date: Wed, 4 May 2011 15:48:03 +0800
On Tue, May 03, 2011 at 03:42:56PM -0400, Paul B. Cameron wrote:
I believe I'm able to answer my own questions:
1. Use xmlGetNodePath to build the node path instead of rolling a custom
function.
right !
2. There is no need to return a copy of a node retrieved by an XPath
evaluation - node pointers returned by the query point to the actual node
memory in the tree. These nodes do not become invalid when the query object
or context are freed.
And right ! ... except for the nasty case of namespace nodes, where
libxml2 model and XPath data model don't match and as a result the
namespace nodes returned in an XPath query don't come from the tree
(but are freed when the XPath object is freed).
aniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]