PDA

View Full Version : Parsing the xml namespace



atomic
28th September 2015, 11:50
Hi,
I have problem with QDomDocument and parsing xml namespace. The following xml element


<d:prop>


for tagName() give me


"d:prop"

but for localName() and prefix() give me empty string why?
What I am doing wrong here?

Added after 7 minutes:

Second parameter of setContent() must be set to true for namespace processing...

so


QDomDocument xmlDocument;
xmlDocument.setContent(xmlContent, true);


I hope this can help someone else with similar problem.