Hello Guys,
I have an Array of dictionaries
And with this command i made an XML file
Here is my question!
here is the way it represent the keys and values here,but how can i convert this tags :
to this form:
when i want to create them ?
I have an Array of dictionaries
Code:
NSMutableArray* list = [NSMutableArray array];
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"first value",@"text", @"number 1",@"value", nil]];
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"second value",@"text", @"number 2",@"value", nil]];
[list addObject:[NSDictionary dictionaryWithObjectsAndKeys:@"third value",@"text", @"number 3",@"value", nil]];
And with this command i made an XML file
Code:
[list writeToFile:path atomically:YES];
Code:
<plist version="1.0">
<array>
<dict>
<key>text1</key>
<string>first value</string>
<key>value</key>
<string>number 1</string>
</dict>
<dict>
<key>text2</key>
<string>second value</string>
<key>value</key>
<string>number 2</string>
</dict>
<dict>
<key>text3</key>
<string>third value</string>
<key>value</key>
<string>number 3</string>
</dict>
</array>
</plist>
Here is my question!
here is the way it represent the keys and values here,but how can i convert this tags :
Code:
<key>text3</key>
<string>third value</string>
Code:
<text3>third value</text3>
when i want to create them ?