libxml-raku / LibXML-raku

Raku bindings to the libxml2 native library
Artistic License 2.0
11 stars 5 forks source link

LibXML::Reader parser options mappings are wrong. #20

Closed dwarring closed 5 years ago

dwarring commented 5 years ago

xmlTextReader vexingly has a different set of enumerations for getting and setting options.

Getters are:

XML_PARSER_LOADDTD => 1, XML_PARSER_DEFAULTATTRS => 2, XML_PARSER_VALIDATE => 3, XML_PARSER_SUBST_ENTITIES => 4

Setters are:

XML_PARSE_DTDLOAD => 4, XML_PARSE_DTDATTR => 8, XML_PARSE_DTDVALID => 16, XML_PARSE_NOENT => 2,

Which makes the parser options the same as LibXML::Parser::Context and means we need to handle the getter separately.