Re: [xml] parsing a DTD to get elements and attributes



On Tue, Feb 18, 2003 at 04:05:02PM +0100, Andreas B. Thun wrote:
Hello,

I want to parse a simple, self-made DTD to get the
elements and the attributes I´ve defined there.

I understand that I have to use xmlParseDTD() but don´t know
which functions to use to get all elements with their
attributes.

  The little APIs exported are in valid.h
The structure of the DTd is exposed, you will have to study and scan
it. xmlDtd, xmlAttribute and xmlElement structures are in tree.h, the
elements and attributes are in hash tables in the DTD. Looking at code
in valid.c or functions exported by valid.h may be useful.

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]