Re: [xml] Listing possible valid attributes
- From: D Haley <mycae yahoo com>
- To: veillard redhat com
- Cc: xml gnome org
- Subject: Re: [xml] Listing possible valid attributes
- Date: Tue, 6 Oct 2009 16:20:46 -0700 (PDT)
That sounds like it might work! I will give it a try.
--- On Wed, 10/7/09, Daniel Veillard <veillard redhat com> wrote:
From: Daniel Veillard <veillard redhat com>
Subject: Re: [xml] Listing possible valid attributes
To: "D Haley" <mycae yahoo com>
Cc: xml gnome org
Date: Wednesday, October 7, 2009, 2:50 AM
On Sat, Oct 03, 2009 at 01:34:02AM
-0700, D Haley wrote:
Hello,
I have been hunting around the API, but I cannot seem
to find any way to obtain a list of attributes as specified
by the DTD for a given type of node.
I am basically building a simple XML writing "helper"
app and I would like to show users what their attribute
options are. Does anyone know how I might do this, or where
I should look?
Hum, right, there is no equivalent to
xmlValidGetPotentialChildren()
but for attributes... The solution is:
- use xmlGetDtdElementDesc/xmlGetDtdQElementDesc to find
the DTD
element description for the element
- walk the list of struct _xmlElement returned called
attributes
IIRC the list use the ->next link to
get to the next attribute
on that node (nexth is used internally
for the attribute hash table
of the full DTD).
Daniel
--
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]