Validating xml parser purpose
Apart from the built-in DTD support in parsers, lxml currently supports three schema languages: DTD, Relax NG and XML Schema.All three provide identical APIs in lxml, represented by validator classes with the obvious names.The API is relatively stable, but I won't currently promise any ABI stability.Dynamic linking against yxml is therefore not a very good idea.Besides the expected things like being able to parser elements and attributes as well as making sure they are well-formed, a conforming non-validating XML parser should also support the following: The internal DTD subset consist of the DTD declarations that are found in the XML document itself as opposed to the external subset which consists of the declarations placed into separate DTD files and referenced from the XML documents.
Out of curiosity I checked the parser’s description and there I saw a number of common traits of most new, fast, and small XML parsers these days: no support for DTD (internal subset) and CDATA sections, limited support for character and entity references.
And now follows a list of things that are not part of the core XML specification and are not directly supported.
As with the conformance issues, these features can be implemented on top of yxml.
SIZE PERFORMANCE LIB VER LICENSE OBJ STATIC WIKI DISCOGS strlen 25 816 0.16 0.09 expat 2.1.0 MIT 162 139 194 432 1.47 1.09 libxml2 2.9.1 MIT 464 328 518 816 2.53 1.75 mxml 2.7 LGPL2 static 32 733 75 832 12.38 7.80 yxml git MIT 5 971 31 416 1.15 0.74 SIZE PERFORMANCE LIB VER LICENSE OBJ STATIC WIKI DISCOGS strlen 25 816 0.16 0.09 expat 2.1.0 MIT 113 314 145 632 1.58 1.20 libxml2 2.9.1 MIT 356 948 412 256 3.01 2.08 mxml 2.7 LGPL2 static 27 725 71 704 11.70 7.44 yxml git MIT 4 955 30 392 1.67 1.02 TL; DR: yxml does not accept garbage XML documents, it will correctly handle and report issues if the input does not strictly follow the XML grammar.
The terms validating and non-validating have specific meanings within the context of XML.