[xml] xml parsing problem



Hello all,

I have encountered a problem while migrating from libxml2.5.11 to libxml2.6.7. Hopefully you can give me a hint for a workaround.


The Problem is best described with a small example using xmllint tool.

Parsing:
        <a xsi:type="string">xxx</a>
with xmllint of libxml2.5.11 works fine; no warnings, no errors.

When parsing the same XML with xmllint of libxml2.6.7 the following namespace error occurs:

./xmllint test.xml
test.xml:1: namespace error : Namespace prefix xsi for type on a is not defined
<a xsi:type="string">xxx</a>
                   ^
At first view this beahviour is OK, because this is an invalid XML document. Im my case this new behaviour is a problem, because this XML is part of a valid XML document, "xsi" is defined in one of "a"'s parent nodes.

This XML is a result of XML decryption and now should be parsed and linked to the original document. This Problem occures when using xmlsec with libxml2.6.7


So my question is, is there a way to behave current xmllint like the one of version 2.5. More important is, what are the API parser settings to parse this kind of 'invalid' XML and build a correct DOM tree?


Thanks for help

Matthias











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