That sounds like it might work! I will give it a try. --- On Wed, 10/7/09, Daniel Veillard <[email protected]> wrote:
> From: Daniel Veillard <[email protected]> > Subject: Re: [xml] Listing possible valid attributes > To: "D Haley" <[email protected]> > Cc: [email protected] > 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/ > [email protected] > | Rpmfind RPM search engine http://rpmfind.net/ > http://veillard.com/ | virtualization library http://libvirt.org/ > _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
