XMLWriter - From NSDictionary to XML String

The title says it all. Problem statement I faced was I was too lazy to write a long code for my XML with child parent. So I figured if I can just convert my Dictionary content to XML would be nice.



Don't know if it supports all Dictionary structure but so far my structures works perfectly.Huhu.Implementation as below.


[XMLWriter XMLDataFromDictionary:dictionary toStringPath:mylocation Error:&err];

Where mydictionary contains all the NSDictionary and mylocation is where I want to save it. Or you can just convert it to string as

NSString* string = [XMLWriter XMLStringFromDictionary:dictionary Error:&err];

The source code is at GitHub at https://github.com/ahmyi/XMLWriter

Comments

Popular Posts