Languages

Menu
Sites
Language
Parse a XML String

Hi All,

How to parse an xml string using xmlParseDoc() ? .. i have String object which contains xml data i need to parse it.

Best regards

Mohan

 

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

5 Replies
Leo Joseph
You can check your sample App in Tizen IDE https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.native.appprogramming%2Fhtml%2Ftutorials%2Fxml_tutorial%2Ftask_xmlparserapp_parsing.htm
Mohan Kumar
Hi Leo, The example given is using xml file. i want an parser with String object which contains xml data. when i try using xmlParseDoc(), it doesnt print the content of the nodes. Do you have any example and anybody can share with me? Best regards, Mohan
wil smith
Prototype of xmlParseDoc() is: xmlDocPtr xmlParseDoc( const xmlChar * cur ); You can can notice it takes xmlChar type data. It can't handle String type directly, you need to convert String data to xmlChar type first.
Mohan Kumar
thanks. i tried using String utilities. not able to convert. can you help me to convert ?
wil smith
For sample code you can have a look into the SDK sample XmlParserApp as suggeseted by "Leo Joseph"