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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:02:00+00:00 2026-06-14T10:02:00+00:00

Here is the XML code seperated by commas, i am parsing this as a

  • 0

Here is the XML code seperated by commas, i am parsing this as a string, now need to convert as integer:
struct in .h file:
NSString * positions;

XML file:
100,280,924,320

here is the code:

 NSArray * positons = [partyMember elementsForName:@"position"];
    if (positons.count > 0) {
        GDataXMLElement *firstName = (GDataXMLElement *) [positons objectAtIndex:0];
        //parsed[i].positons = firstName.stringValue;
        parsed[i].positons = firstName.stringValue;
        NSLog(@"position-%@,\n",parsed[i].positons);

first name is locally declared , parsed[i].positions has da parsed value,

  • 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-06-14T10:02:02+00:00Added an answer on June 14, 2026 at 10:02 am

    here is what i did 🙂 change Objectatindex value while applying it in viewcontroller

     NSArray * positons = [partyMember elementsForName:@"position"];
        if (positons.count > 0) {
            GDataXMLElement *firstName = (GDataXMLElement *) [positons objectAtIndex:0];
            //parsed[i].positons = firstName.stringValue;
            parsed[i].positons = firstName.stringValue;
            NSLog(@" parsed position is %d, i = %d\n",[parsed[i].positons integerValue],i);
            NSArray* arr = [parsed[i].positons componentsSeparatedByString:@","];
           // firstStr = [[arr objectAtIndex:0] intValue];
            NSLog(@"position-%d,\n",[[arr objectAtIndex:2] intValue]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn some XML Parsing here and I've been given some code
I am new to xml and android programming.Here is my xml code... I don't
My xml code is here, <?xml version=1.0 encoding=utf-8?><RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:id=@+id/mainlayout > <LinearLayout
Here's the code I have: from cStringIO import StringIO from lxml import etree xml
Here is the code I have tried to append a node in existing xml,
Here is my code. <?xml version=1.0 encoding=utf-8?> <fx:Script> <![CDATA[ import comps.sampleTextArea; import mx.managers.PopUpManager; protected
enter code here I have a ListView that have a different Layout XML for
Here's my layout code; <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent> <TextView android:text=@string/welcome
Here is my code #!usr/bin/env perl # Setup includes use strict; use XML::RSS; use
I'm trying to update an element in the XML document below: Here's the code:

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.