문제

I've QDomElement object converted to QString via element.text() method and stored in mysql database in text format. I've a problem while extracting it from database, because having extracted from database it has a format of QString, so I need to convert it again to QDomElement in order to further implement smth with that object. How can I do this?

올바른 솔루션이 없습니다

다른 팁

You can parse the string into a QDomDocument and then extract the whole tree:

QString input("<xml></xml>");
QDomDocument xmlDoc;
xmlDoc.setContent(input);
QDomElement output = xmlDoc.firstChild().toElement();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top