[xml] parsing DTD



Hi,

I'v just started to use libxml and I'm trying to access the content of an
element in a dtd declaration. For example I need to access what the element
'doc' contains in the following declaration:

<!ELEMENT doc (a+, b, c*)>

Using the function:

  xmlElementPtr   xmlGetDtdElementDesc    (xmlDtdPtr dtd,
                                           const xmlChar *name);

I am able only to get the name of the first child of the element doc:

xmlElementPtr ele;
ele=xmlGetDtdElementDesc(dtd, "doc");

ele->content->c1->name returns "a"
ele->content->c2->name returns nothing (I don't know why)

How can I get the name of the third element?










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