Re: [xml] How to check whether a node contains a certain property?

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Wed Jul 12 2000 - 10:44:04 EDT


On Wed, Jul 12, 2000 at 10:15:37AM -0400, rcx195@us.ibm.com wrote:
>
> Is there some function for checking whether a node contains a property?
> Usually I use xmlGetProp function to get a property of a node. But
> according to the reference mannual, I have to free the memory taken by the
> return value. For my "checking only" purpose, I may never use the return
> value of xmlGetProp and I do not want the memory to be allocated to store
> the property value.
> So I am wondering whether there are other functions that I can use.

  Hum, makes a lot of sense,
I added xmlHasProp() to tree.c in my code base, before it get's
propagated in a new release you can use the enclosed code if needed.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe


----
Message from the list xml@xmlsoft.org
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@xmlsoft.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:30:22 EDT