Re: [xml] Property Question
- From: Daniel Veillard <veillard redhat com>
- To: gerryw objectivedomain com
- Cc: xml gnome org
- Subject: Re: [xml] Property Question
- Date: Tue, 19 Mar 2002 02:49:32 -0500
On Mon, Mar 18, 2002 at 11:05:28PM -0600, gerryw objectivedomain com wrote:
Hi,
I need to obtain properties for an element without knowing them in advance
(ie; an alternative to xmlGetProp). What is the best way to discover the
properties of an element? I have seen the function for determining if a
node HAS properties, but I don't see one for getting a list of properties.
I have also seen a pointer to the properties in one of the structure
definitions, but I want to do this in a way that will be compatible with
future releases of libxml.
Well so far there is no xmlListProp() function. People, me included
simply walk the node->properties list, however this is not always sufficient
since some properties may be inherited from the DTD and in this case are
not listed on node->properties.
Libxml2 is in an API freeze mode at the moment, but I don't think
there would be any resistance to adding such an entry point. If someone
provides a correct patch to add this I would certainly integrate it,
the only tricky part is to get the element definition from the DTD
if available and add defaulted attribute if not already present in the
node->properties list.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.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]