This question already has an answer here:
- Converting NSDictionary to XML 3 answers
I need to convert a dictionary to XML format for using with SOAP webservice in objective C .
Let the dictionary be {
password = testpassword;
username = testusername;
}
and the converted result i need is :
<password>testpassword</password>
<username>testusername</username>
i need a specific function to get output like this format for dynamic dictioanry .
many libraries are available but i dont get output like this .
thanks in advance ..
Try this third-party https://github.com/nicklockwood/XMLDictionary. It should work
Please use below code for converting NSDictionary to XML.