I'm trying to serialize a xml like this:
<Rows>
<RowOne SKATERID="706" MANUFACTURER="A-DZG" ISFACT="F" ISSKATE="F">True</RowOne>
<RowTwo SKATERID="318" MANUFACTURER="A-FGW" ISFACT="F" ISSKATE="T">True</RowTwo>
<RowThree SKATERID="458" MANUFACTURER="A-OPJ" ISFACT="F" ISSKATE="T">False</RowThree>
<RowFour SKATERID="178" MANUFACTURER="A-JSL" ISFACT="F" ISSKATE="T">True</RowFour>
</Rows>
But my question is what would be the best way of doing it including the atributes. So far I have my parser working and when I detect the node has attributes I'm sending those to a local nsmutabledictionay. but my question is how do I map the dictonary of attibutes and the value of the node. for example in RowOne the value is true bute it has the following attibutes SKATERID="706" MANUFACTURER="A-DZG" ISFACT="F" ISSKATE="F" .
in -(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict{
I have this like of code:
if ([attributeDict count] != 0) {
self.myDict = [[NSDictionary alloc] initWithDictionary:attributeDict];
}
in -(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{
I want to figure out what would be the best way of serializing the dictionary with the value of the node
I'll really appreciate your help