Re: XML Namespace Definitions on Non-Root Elements

2011-03-07 Thread Matt Neuburg
Very cool, but I do suggest you file a bug. Apple's XPath interface falls short with regard to namespaces. Contrast, for example, Nokogiri which lets you pass namespace info into an XPath query, or Microsoft with its XML Namespace Manager class. In other words, XPath does know about namespaces,

Re: XML Namespace Definitions on Non-Root Elements

2011-03-07 Thread Heath Borders
That worked! I actually changed it to: nodesForXPath:@"/root/*[name() = \"example:foo\"] Thanks! -Heath Borders heath.bord...@gmail.com Twitter: heathborders http://heath-tech.blogspot.com On Sat, Mar 5, 2011 at 2:27 PM, Matt Neuburg wrote: > On Fri, 04 Mar 2011 14:25:06 -0600, Heath Border

Re: XML Namespace Definitions on Non-Root Elements

2011-03-05 Thread Matt Neuburg
On Fri, 04 Mar 2011 14:25:06 -0600, Heath Borders said: >I'm trying to parse a document with a namespace declared on a non-root element: > >http://example.com/foo";>This is an >exemplary foo! > >I can read this xml into an NSXMLDocument just fine, but the following >XPath query on root returns a

XML Namespace Definitions on Non-Root Elements

2011-03-04 Thread Heath Borders
I'm trying to parse a document with a namespace declared on a non-root element: http://example.com/foo";>This is an exemplary foo! I can read this xml into an NSXMLDocument just fine, but the following XPath query on root returns a non-nil, but empty NSArray: NSXMLNode *rootNode = ...// create m