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

  • Home
  • SEARCH
  • 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 4034844
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:01:25+00:00 2026-05-20T12:01:25+00:00

I am using the XML parser libxml2 with wrapper as given on the page

  • 0

I am using the XML parser libxml2 with wrapper as given on the page
http://cocoawithlove.com/2008/10/using-libxml2-for-parsing-and-xpath.html

But i am not sure if I am using correctly and am getting errors (parsing,etc)

So could someone please provide me a complete example which i can refer and get an idea if I am doing something incorrectly.

thanks a lot for all your help in advance.

  • 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-20T12:01:26+00:00Added an answer on May 20, 2026 at 12:01 pm

    I’m using this methods too, to parse xml and html files.
    For example to parse rss xml:

    //add xml source
    NSURL *url = [NSURL URLWithString:@"http://feeds.bbci.co.uk/news/rss.xml?edition=int"];     
    NSData *xmlData = [NSData dataWithContentsOfURL:url];
    
    //parse the whole file with all tags
    NSArray *rssFeedArray = PerformXMLXPathQuery(xmlData, @"//*");
    NSLog(@"rssFeedArray: %@", rssFeedArray);
    

    //* – query means the parser will go through all tags of the file. Then log the array to see the whole structure of xml.

    Whith ‘/rss/channel/item’ query you will only get the item tags element’s, (or to get only the first item use ‘/rss/channel/item[1]’).

    in this case because of the bbc feed structure you can catch each item title at

    [[[[rssFeedArray objectAtIndex:i] valueForKey:@"nodeChildArray"] objectAtIndex:0] valueForKey:@"nodeContent"]]
    

    and description at

    [[[[rssFeedArray objectAtIndex:i] valueForKey:@"nodeChildArray"] objectAtIndex:1]valueForKey:@"nodeContent"]]
    

    and go on and on.

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

Sidebar

Related Questions

In my application, I am parsing XML data using SAX Parser. But, I want
I'm trying to write a generic XML to Core Data parser using libxml2. Since
I am using DOM parser to parse xml data, but its taking lots of
I have student.xml file and am parsing this file using SAX Parser and now
I am reading HTML files from a folder using xml parser that store the
I am having trouble parsing some returned XML using this command: XML::Parser.string(xml_string).parse Here is
NOT USING A XML PARSER I want to get the contents of the XML
Possible Duplicate: Best XML Parser for PHP Using JAXB with Google Android I need
I am begginer to android development. I am using SAX parser for xml parser.
I want to parse the xml file with dynamic content using DOM parser in

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.