Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unescape XML in Qt?

Tags:

c++

xml

qt

I have QString like "< foo & blah >" (no tags, only character data) and I want to unescape it. There is Qt::escape function in Qt namespace, yet no reverse counterpart for it.

So, how can I unescape XML string in Qt?

Specific requirement: it must be possible with Qt 4.7.3.

like image 954
hate-engine Avatar asked Dec 01 '25 14:12

hate-engine


1 Answers

It looks like someone made an html entity decoder in an answer to an old post. If you don't mind introducing a new dependency, that might be a good solution.

like image 112
Gordon Bailey Avatar answered Dec 03 '25 05:12

Gordon Bailey



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!