Skip to content
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

Can't parse root note with attributes? #48

Open
sjmills opened this issue Sep 15, 2017 · 1 comment
Open

Can't parse root note with attributes? #48

sjmills opened this issue Sep 15, 2017 · 1 comment

Comments

@sjmills
Copy link

sjmills commented Sep 15, 2017

I was getting strange results when parsing an .acbf file, so I started whittling it down until it finally read correctly. Here's the file that won't read correctly with TouchXML:

This results in an empty array:

CXMLDocument* doc = [[CXMLDocument alloc] initWithContentsOfURL:url options:0 error:&err];
NSLog(@"%@", [doc.rootElement nodesForXPath:@"/ACBF" error:&err]);

Removing the xmlns attribute allows it to parse correctly.

It works correctly WITH the xmlns attribute when using NSXMLDocument instead of CXMLDocument.

@sjmills
Copy link
Author

sjmills commented Sep 15, 2017

BTW, I'm using the feature/ARC branch, since the docs say that's the one to use for ARC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant