-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XML to NSDictionary not working with XMLReader #2
Comments
Thanks. This is a great suggestion. I really want to get reliable XML support available, but have not had the cycles to focus on it myself. Will take a look at the TBXML+NSDictionary implementation. |
Any progress on this? |
I believe @samkrishna has active development underway on this |
I actually forked it and got it working with TBXML+NSDictionary |
I'll check out the fork. -S On May 9, 2013, at 12:34 PM, segiddins [email protected] wrote:
|
Fixed with pull request #3 |
Hi,
I'd highly recommend switching to TBXML+NSDictionary because XMLReader has some weird side effects. Let's suppose our XML has the same structure as the Article xml
<title>My Article</title> Blake Very cool!! ``
(I choose this one because the one that I have to work with has exactly the same structure)
If you choose to parse this xml with XMLReader you'll get something like this:
NSDictionary:
{ article = { title = { text = "My Article"; }; author = { text = "Blake"; }; body = "Very cool!!"; }; }
Unfortunately RKObjectMappingOperation or RKObjectMapping, not quite sure, expects something like this:
NSDictionary:
{ article = { title = "My Article"; author = "Blake"; body = "Very cool!!"; }; }
So you'll end up with an Article that has no properties initialised. If you take TBXML+NSDictionary everything works perfectly.
Sincerely Martin
The text was updated successfully, but these errors were encountered: