[webkit-dev] Writing a new XML parser with no external libraries

Maciej Stachowiak mjs at apple.com
Wed Jun 29 03:39:59 PDT 2011


On Jun 29, 2011, at 2:13 AM, Konstantin Tokarev wrote:

> 
> 
> 29.06.2011, 07:42, "TAMURA, Kent" <tkent at chromium.org>:
>> I'm a little negative of developing a new XML parser. I'm afraid that the new parser introduces a lot of security/stability problems which existing parsers already resolved.
>> How about importing Expat parser to WebKit repository and maintain it by ourselves?
> 
> What about RapidXml?
> 
> http://rapidxml.sourceforge.net/

Both RapidXml and Expat apparently have not been updated in quite some time (since 2009 and 2007 respectively). Copying an unmaintained project into the WebKit repository and forking it is certainly a possible alternative to writing something new based on the approach of our HTML5 parser. But I'm not sure it this approach gives us a long term more hackable code base. Cases where we've done this have often resulted in code that doesn't fit WebKit style and isn't fully understood by anyone.

RapidXml in particular only claims "reasonable W3C compatibility", which likely is not an adequate level of conformance for a browser engine. I don't know if updating it to full XML 1.0 and Namespaces in XML 1.0 compliance would be a lesser effort than adapting the HTML parser.

Regards,
Maciej



More information about the webkit-dev mailing list