Re: [xml] libxml2: Get the wrong number of occurrence of elements from DTD

On Fri, Mar 12, 2004 at 03:43:39PM -0500, David Franklyn wrote:

I am using DTDReader by Ashley Cambrell to parse a DTD file with some 

<?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT foo (bar?, goo+)>
   return elementFromDtd->content->ocur;

In both situations, the return value is one, that is, 

  Normal, it's (bar?, goo+) once. You would get something
different for (bar?, goo+)+ or (bar?, goo+)? or (bar?, goo+)*
content pointer is a tree, you must walk the tree to understand it.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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