[SOLVED] how to parse character pointer;
-
char* GetFeaturedResult;
qDebug()<<response->GetFeaturedResult;
prints... this
@- <Root>
- <Record>
<Name>Featured</Name>
<logo>http://10.25.4.49/monsoonstore/Featured/CATALOG_200X217.PNG</logo>
</Record> - <Record>
<Name>Catalog</Name>
<logo>http://10.25.4.49/monsoonstore/Featured/FEATURED_200X217.PNG</logo>
</Record> - <Record>
<Name>Stores</Name>
<logo>http://10.25.4.49/monsoonstore/Featured/STORES_200X217.PNG</logo>
</Record>
</Root>
@
pls help me how to parse this object..... thanks
-
Have a look at Qt's xml parsing capabilities e.g. "here":http://doc.qt.nokia.com/4.7/qxmlsimplereader.html
-
[quote author="loladiro" date="1308646656"]Have a look at Qt's xml parsing capabilities e.g. "here":http://doc.qt.nokia.com/4.7/qxmlsimplereader.html[/quote]
its no use...
-
Please, clearly state what you want to achieve and give clear questions. Then you might also get clear answers.
have a look at "smart questions":http://www.catb.org/~esr/faqs/smart-questions.html -
TobbY, in the "doc page posted by loladiro":http://doc.qt.nokia.com/4.7/qxmlsimplereader.html:
[quote]
If you can't parse the entire input in one go (for example, it is huge, or is being delivered over a network connection), data can be fed to the parser in pieces.
[/quote]and so on...
-
[quote author="Andre" date="1308649061"]It doesn't matter if your data comes from a file or the internet. You can still use the XML parsing classes. What is weird though, are the - signs in your text to parse. Are they actually in your data? [/quote]
no they are not in my data, actually i am trying web services, and xml parser need .xml files, and i stuck there
-
[quote author="TobbY" date="1308650464"]
no they are not in my data, actually i am trying web services, and xml parser need .xml files, and i stuck there[/quote]
An XML parser need XML data. It does not matter if you read the bytes from a file on the disk or receive them from some network source. Put the received result in a [[Doc:QByteArray]] and feed that data to the XML parser.