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 909491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:53:12+00:00 2026-05-15T16:53:12+00:00

I have the following code: NSString *subtitle = [[[node elementsForName:@subtitle] objectAtIndex:0] stringValue]; NSString *duration

  • 0

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?

  • 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-15T16:53:13+00:00Added an answer on May 15, 2026 at 4:53 pm

    “itunes” is the namespace identifier. It doesn’t actually have any significance on its own, it just links a URI with the element in question. It looks like you’re using the iTunes RSS extensions, which live under the namespace http://www.itunes.com/dtds/podcast-1.0.dtd.

    So, for namespaced elements, I think (I’m not familiar with Objective-C or NSXML :P) you want to use elementsForLocalName instead:

    [node elementsForLocalName: @"duration" URI: @"http://www.itunes.com/dtds/podcast-1.0.dtd"]
    

    For the answer to the second question, see comments below.

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

Sidebar

Ask A Question

Stats

  • Questions 537k
  • Answers 537k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is meant to enforce that you actually have a… May 17, 2026 at 1:45 am
  • Editorial Team
    Editorial Team added an answer My problem is resolved.The changes are to be made in… May 17, 2026 at 1:45 am
  • Editorial Team
    Editorial Team added an answer jquery has .inArray() method. It's the best I know.. May 17, 2026 at 1:45 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have the following code: NSString *text = @http://bit.ly/111 http://bit.ly/222 http://www.www.www; NSRegularExpression *aLinkRegex =
How to add news via FBConnect? I have the following code: NSString *newsBody =
I have the following code in place: NSString *mapIDx = @98; NSLog(@map id: %@,
I Have the following code: -(void) changeAnimation:(NSString*)name forTime:(int) times { if(currentAnimation != @attack) {
I have the following code @implementation UIDevice(machine) - (NSString *)machine { size_t size; //
I have gone through this question that shows the following code: -(NSString *)tableView:(UITableView *)tableView
I have the following code to parse a date from string: NSString * str
I have used the following code to get the location of the particular place
I have the following code that populates an array (this is within a loop):
I have the following code that saves the users sketch data to a file...

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.