Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6202079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:40:08+00:00 2026-05-24T04:40:08+00:00

In GdataXML I can only use nodesforXpath from the root of XML, but I

  • 0

In GdataXML I can only use nodesforXpath from the root of XML, but I want that once I have the inferenceMembers I would like to apply Xpath to rest of this node, but not whole DOM tree, is that possible?

Example below works wrong in for loop, brings all the varibles in the DOM, but I want to work only on the variableElement not whole the DOM once I have the variableElement.

NSArray *inferenceMembers = [doc nodesForXPath:@"//inferenceresponse/state/variable[not(valuedefinition/variablevalue)]" error:nil];

for (GDataXMLElement *variableElement in inferenceMembers) {
 Variable *variable=[[Variable alloc] init];
 NSArray *items = [variableElement nodesForXPath:@"//variable/domaindefinition/domain/enumType/domainitem" error:nil];          
}

The reason I want this not because it is hard to do, but I guess it would be slower if I xpath query to whole XML to reach the same element’s children each time. I have read that I can do some magic with namespaces and NSDictionary but do not know how to do

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:40:11+00:00Added an answer on May 24, 2026 at 4:40 am

    Try this:

    NSArray *inferenceMembers = [doc nodesForXPath:@"//inferenceresponse/state/variable[not(valuedefinition/variablevalue)]" error:nil];
    
    for (GDataXMLElement *variableElement in inferenceMembers) {
     Variable *variable=[[Variable alloc] init];
     NSArray *items = [variableElement nodesForXPath:@"domaindefinition/domain/enumType/domainitem" error:nil];          
    }
    

    It’d be useful to see the XML structure to be able to help fully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just want to know that how can I use url in GDataXML parser
I have a string that I have parsed from XML using Google's GDataXML parser,
I have an Objective C application that reads data from an RSS feed using
-<stat> <visitor>4</visitor> <uniqueVisitor>2</uniqueVisitor> <order>41</order> <revenue>20658</revenue> <conversionRate>48</conversionRate> <newProduct>25</newProduct> <outOfStockProduct>11</outOfStockProduct> </stat> From this xml i want
i parsed a XML with GDataXML but now i need display the result in
I am trying to parse an xml using GdataXML I have a query which
I have the following xml. I am trying to parse this using gdataxml parser.
I am making an iOS app where I'm using the GDataXML library for xml
i am developping an ios application and i am parsing my xml with gdataxml,
When using GDataXML* to build an XML document, how do I set the doctype

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.