This is my code below and I want to make the value in the XML string being read from my valueVariable but not static 0. how can I do that. I heard about stringWithFormat: but I couodnt apply it since my string is in a replacement function. My real string is much longer and messy.
NsInteger valueVariable=0;
theXML =[theXML stringByReplacingOccurrencesOfString:@"<valuedefinition/>" withString:@"<variablevalue value=\"0\"/><source type>"];
Snippet:
Output:
Note:
It’s strongly recommended to use libraries like KissXML to create, edit and parse XML-files.