Sign in to follow this  
medhassu

Mapping the Values in to Buffer

Recommended Posts

Hai Associates, I have been working on the retrieving text data from the XML string. I am using tinyxml_2_3_3 parser.I have used the following APIs to get the data void Load() { TiXmlDocument Doc; Doc.Parse(your_string); RecurseTree(&Doc); } void RecurseTree(TiXmlNode *pNode) { printf("%s\n", pNode->Value()); TiXmlNode *Child = pNode->FirstChild(); for(; Child; Child = pNode->IterateChildren(Child)) RecurseTree(Child); } By using it i am able to print the contents of the string. But i should have to copy the values from pNode->Value() in to a single buffer which should be returned to calling function. The following is my XML string. <rx-event> <topic>Mgmt</topic> <subtopic>645268923afce</subtopic> <context>PubSubComm-3</context> <params> <rx-status>ok</rx-status> <column1>Hello</column1> <column2>412</column2> <column3>Welcome to</column3> <column4>India</column4> </params> </rx-event> I have to copy some specific values in to buffer only. I require the values of the following elements. column1,column2,column3,column4 i.e Hello, 412,Welcome to, India to be copied. Please suggest me away to copy our required values only.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this