Unsolved How to get namespaces in the root QDomElement?
-
most xml like to declare namespaces in the root element like this:
<root xmlns="a" xmlns:x="b"> <x:e /> </root>
but call
QDomDocument::setContent
with settingnamespaceProcessing
totrue
will result unexpected behavior:rootElem.prefix(); // "" rootElem.namespaceURI(); // "a" eElem.prefix(); // "x" eElem.namespaceURI(); // "b" rootElem.attributes(); // empty map!!! can't even parse manually
Is there an easy way to get all namespaces in a QDomElement?
thanks.