Hello,
Currently I struggle with parsing some XML data without idea how to solve my problem. What I want to do is to parse text data from one of the elements in XML, everything is working but not as expected.
XML example:
<?xml version="1.0" encoding="UTF-8"?>
<textData>
<text>
...
<des> Sample data with link <a href = ..> and bb code [bbcode], with entities ™ </des>
</text>
</textData>
<?xml version="1.0" encoding="UTF-8"?>
<textData>
<text>
...
<des> Sample data with link <a href = ..> and bb code [bbcode], with entities ™ </des>
</text>
</textData>
To copy to clipboard, switch view to plain text mode
and I expect to get this:
Sample data with link <a href = ..> and bb code [bbcode], with entities ™
Sample data with link <a href = ..> and bb code [bbcode], with entities ™
To copy to clipboard, switch view to plain text mode
Using QDom works fine, I can retrieve that text but the problem is that text is parsed. So I don't get <a href ..>.
When I use QXmlStreamReader approach thing are getting even more frustrating because data stops on first entity occurrence (I'm using polish characters so ... utf-8 don't handle all of them).
So conclusion that I cam up with is that error occur with text() function and parsing.
And the question: is there a way to force QDom / QXmlStreamReader to output raw / unformated text? (currently I don't want to use regexp to parse id out, but it seams that's only way)
Best regards.
Bookmarks