Re: [xml] Any easy way to check if a node is in doc already?
- From: Daniel Veillard <veillard redhat com>
- To: "Yong Chen (yongche)" <chen cisco com>
- Cc: xml gnome org
- Subject: Re: [xml] Any easy way to check if a node is in doc already?
- Date: Wed, 29 Mar 2006 03:12:24 -0500
On Tue, Mar 28, 2006 at 07:22:37PM -0800, Yong Chen (yongche) wrote:
Hi,
What I want is to check if an exact node is already in doc, if not, then
add it to the doc.
An "exact node" means a node having the same name, attributes, type,
etc.
No, you must walk the tree. The semantic of what you are describing
is however extremely confuse, does it include equality of namespace
prefixes too, is the model recursive (if no then comparing element nodes
would make no sense), etc ...
XML is not a reduced database, it has none of the features, and vice-versa.
The only kind of index you can find natively in the tree are ID associated
to elements. But all this is really common knowledge
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]