Create XML file dynamically in Iphone -
i want create xml file dynamically iphone application. tried using nsxmldocument nsxmldocument not declared in iphone application.
please me in doing so.
thanks
gaurav
try open source xml stream writer ios:
- written in objective-c, single .h. , .m file
- one @protocol namespaces support , 1 without
example:
// allocate serializer xmlwriter* xmlwriter = [[xmlwriter alloc]init]; // start writing xml elements [xmlwriter writestartelement:@"root"]; [xmlwriter writecharacters:@"text content root element"]; [xmlwriter writeendelement]; // resulting xml string nsstring* xml = [xmlwriter tostring];
this produces following xml string:
<root>text content root element</root>
Comments
Post a Comment