Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Why does GDataXMLDocument's nodesForXPath method fail?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Zak  
View profile  
 More options Jul 15 2012, 2:00 pm
From: Zak <zakdan...@gmail.com>
Date: Sun, 15 Jul 2012 11:00:41 -0700 (PDT)
Local: Sun, Jul 15 2012 2:00 pm
Subject: Re: Why does GDataXMLDocument's nodesForXPath method fail?

There's something wrong with my XML string...I tried a different XML string
and it worked fine. I'll have to investigate further.

On Sunday, July 15, 2012 2:17:36 AM UTC-5, Zak wrote:

> Here's my code:

> *GDataXMLDocument** *doc = [[**GDataXMLDocument** **alloc**] **
> initWithXMLString**:myXMLString** **options**:**0** **error**
> :&xmlParseError];*

> *NSInteger** **XPathCount** = [[doc **nodesForXPath**:**@"//entry/title"**
> **error**:**nil**] **count**];*

> *NSInteger** **elementsForNameCount** = [[doc.**rootElement** **
> elementsForName**:**@"title"**] count**];*

> *NSLog**(**@"XPath count: %i"**, **XPathCount** );*

> *NSLog**(**@"elementsForName count: %i"**, **elementsForNameCount** );*

> The result is the XPathCount returns 0 and elementsForNameCount returns 1
> despite the fact that they should BOTH be 1, since they're pointing to the
> same thing. Just to make sure, I've doubled checked the name of the root
> element with doc.rootElement.name and it is indeed "entry". Why is
> nodesForXPath not detecting the element like it should?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.