iphone - objective c XMLWriter -


i wanting know how add text variable xml writer.

this trying below

nsstring *teststring = [[nsstring alloc] initwithstring:@"test test test"];     //allocate serializer         id <xmlstreamwriter> xmlwriter = [[xmlwriter alloc] init];         //add root element         [xmlwriter writestartelement:@"rows"];             [xmlwriter writestartelement:@"row"];                 [xmlwriter writecharacters:@"request: %@ can go in here", teststring]; //this line here             [xmlwriter writeendelement];         //close rows element         [xmlwriter writeendelement]; 

so pretty how nslog.. know how can xmlwriter.. or if possible?

otherwise guess other option create whole string outside of xmlwriter? think?

try this:

[xmlwriter writecharacters:[nsstring stringwithformat:@"request: %@ can go in here", teststring]]; //this line here 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -