[xml] HTMLparser enhancements

I've been using libxml2/libxslt for some time, though I'm new to
this list.

Some of my applications use the HTMLparser, and need to know more
about HTML than is provided in the htmlElemDesc.  Specifically,
I have added lookup tables of HTML structure:

  * what attributes are allowed in an element
  * what subelements can be contained in an element
  * default repair-attempt information when elements are misplaced -
    for example, if loose text is found in <ul>, it will insert <li>,
    <table> -> <tr>, <body> -> <div>, etc.

I've done this using my own lookup table (hash), but I could easily
integrate this into libxml2, by extending the htmlElemDesc structure
and the associated declaration in HTMLparser.c.  This could then be
accompanied by a set of simple accessor functions too.

Are you interested in this as a patch?

Nick Kew

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