nicklockwood / XMLDictionary

[DEPRECATED]
http://charcoaldesign.co.uk/source/cocoa#xml-dictionary
Other
1.14k stars 235 forks source link

Parser wrong from nsstring #16

Open HTKT opened 10 years ago

HTKT commented 10 years ago

I added your lib to my source code. When I parser from the returned data from Server, everything is ok except one thing: There is a special Node, it returned an array type but original data from my server is string type.

This special node has format "< / NODENAME>". When parse this node, the dictionary return the array type for this node.

Can you please help me to fix this bug? Thanks so much.

nicklockwood commented 10 years ago

I'd have to see more of the XML to tell if this is a bug or not. If you have multiple nodes with the same name then XMLDictionary gathers them into an array. If you just want the first string in the array, you can get it by using the stringValueForKeyPath: method.