xml2 icon indicating copy to clipboard operation
xml2 copied to clipboard

read_xml "NOWARNING" option does not suppress namespace warnings

Open cole-johanson opened this issue 1 year ago • 0 comments

The "NOWARNING" options states it should suppress warning reports from the libxml2 parser. It does not suppress warnings about the namespace prefix on nodes.

The use-case here is the WordProcessingML from Microsoft's Open XML SDK.

xml2::read_xml("<w:t></w:t>", options = "NOWARNING")
#> Warning in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html =
#> as_html, : Namespace prefix w on t is not defined [201]
#> {xml_document}
#> <w:t>

cole-johanson avatar Mar 14 '23 17:03 cole-johanson