RE: [xml] Any easy way to check if a node is in doc already?




Thanks a lot to all who replied.

Best,
Yong Chen 

-----Original Message-----
From: Kasimier Buchcik [mailto:K Buchcik 4commerce de] 
Sent: Wednesday, March 29, 2006 2:23 AM
To: Yong Chen (yongche)
Cc: ML-libxml2
Subject: Re: [xml] Any easy way to check if a node is in doc already?

Hi,

On Tue, 2006-03-28 at 19:22 -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.

There's no built-in function for what you want to do.
Just walk the whole tree and compare the nodes (and their 
content) on your side.

Regards,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]