[xml] parsing DTD


I'v just started to use libxml and I'm trying to parse a DTD. My
understanding is that with libxml I can not interpret the hierarchy of
elements even though that the content specification (what is and isn't
allowed in the document) is included in DTD. Therefore I'm trying to
write my small parser to interpret the content specification. My
problem is that I did not find any way to access the content
specification. I only receive back the element names, comments and so

Just to clarify I need to access what 'a' element contains in the
following declaration:
<!ELEMENT a(b, c, d*)>
and so I shall get (b,c,d*).

Is there any way to access the content specification?

Also I noticed that my DTD can NOT include the !DOCTYPE declaration:


Is there any work around for parsing a DTD with !DOCTYPE declaration?

Thank you for any help.

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]