-1

I want to create a xml in this format using GDataXml.

<Response>
    <Question Number ="1" OptionID="4" Comments=""/>
    <Question Number ="2" OptionID="3" Comments=""/>
    <Question Number ="3" OptionID="5" Comments=""/>
    <Question Number ="4" OptionID="6" Comments=""/>
</Response>

Please help!!. I quite novice in Objective C

1 Answers1

0

I found a solution.i followed this link

https://github.com/skjolber/xswi

My code is

XMLWriter* objXmlWriter = [[XMLWriter alloc]init];

 [objXmlWriter writeStartDocumentWithEncodingAndVersion:@"UTF-8" version:@"1.0"];
[objXmlWriter writeStartElement:@"Response"];
[objXmlWriter writeStartElement:@"Question"];
[objXmlWriter writeAttribute:@"Number" value:@"52"];
[objXmlWriter writeAttribute:@"OptionID" value:@"2"];
[objXmlWriter writeAttribute:@"Comments" value:@"Test "];
[objXmlWriter writeEndElement];
[objXmlWriter writeEndElement];
[objXmlWriter writeEndDocument];

`

ThomasRS
  • 8,215
  • 5
  • 33
  • 48
  • common , as i mentioned before i am quite novice in Objective c and also needed it urgently!! – GyanPrakash Satapathy Oct 27 '14 at 06:49
  • still - search 30 seconds -- e.g. http://stackoverflow.com/questions/13283840/creating-xml-documents-with-gdataxml?rq=1 -- **oh and note I didn't downvote anything because you're new to SO** take it as advice only – Daij-Djan Oct 27 '14 at 06:51