I want to parse some kind (or pure) XML code from a QString.
My QString is like:
<a>cat</a>My cat is very nice.
I want to obtain 2 strings:
cat, and My Cat is very nice.
I think a XML parser is not maybe necessary, but in the future I will have more tags in the same string so it’s also a very interesting point.
In Qt you have the
QRegExpclass that can help you to parse your QString.According to Documentation example:
The QStringList list will contain the
catandMy cat is very nice.