Solved How to get all namespaces in QDomDocument?
-
I' m looking for a function like this:
QList<QPair<QString, QString>> QDocument::getNamespaces();
and a QDomDocument with following content
<tagName xmlns="a" xmlns:x="b">
call the function should return
[("", "a"), ("x", "b")]
.Thanks
-
Hi
I think you can make such function yourself with
namespaceURI()
http://doc.qt.io/qt-5/qdomnode.html#namespaceURI -
@mrjj thanks, I think I have missunderstand Xml Namespace Scoping, before I thought I need to iter all the element first.