I have the following code:
NSString *subtitle = [[[node elementsForName:@"subtitle"] objectAtIndex:0] stringValue];
NSString *duration = [[[node elementsForName:@"itunes:duration"] objectAtIndex:0] stringValue];
The first line works perfectly. The second line though won't work. I assume it has something to do with namespaces, but I'm pretty new to all of this so I would appreciate any guidance. Thank you!
It turns out that I can use the elementsForLocalName:URI:
to read the element correctly. Now the problem is that since I am using the TouchXML library, it doesn't seem like that method has been mapped over to the CXMLElement
structure (see here).
So the question now is: how can I convert a CXMLElement
to an NSXMLElement
so that I can use that method?