[Qt-interest] QDom and XML-QName-data

Konrad Rosenbaum konrad at silmor.de
Tue Feb 9 19:49:15 CET 2010


Hi,

maybe I'm just blind, but I can't find how to translate the prefix in a 
QNAME typed XML data item (attribute or element value) into an URI. Suppose 
I have the XML structure 

"<ns1:Hello xmlns:ns1="http://blah.org/WhatNot" 
xmlns:ns2="http://example.org/HelloWorld">ns2:World</ns1:Hello>"

already parsed into a QDomDocument with Qt doing namespace resolution. How 
do I translate the value "ns2:World" into the pair 
{http://example.org/HelloWorld} and "World"? According to the documentation 
a QDomText node does not have a prefix or namespace and QDomElement does 
not seem to expose all its prefix-namespace-pairs, nor do xmlns-attributes 
show up as nodes in the DOM-tree.


	Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100209/3edb8af1/attachment.bin 


More information about the Qt-interest-old mailing list