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
Post a Comment