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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:20:36+00:00 2026-06-04T12:20:36+00:00

I have the following string in XML: <Data> <Table> <Id>44</Id> <Name>My Name</Name> <Category>My Category</Category>

  • 0

I have the following string in XML:

<Data>
    <Table>
        <Id>44</Id>
        <Name>My Name</Name>
        <Category>My Category</Category>
    </Table>
</Data>

This is contained within an NSString. I want the quickest way to get the Category into an NSString. I’ve looked at using NSXMLParser. And I also looked at XMLReader.

  • 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-04T12:20:37+00:00Added an answer on June 4, 2026 at 12:20 pm

    Actually, I like using XMLReader.

    NSDictionary *dic = [XMLReader dictionaryForXMLString:xmlString error:nil];
    
    category = [dic valueForKeyPath:@"Data.Table.Category.text"];
    

    Seems pretty clean and simple to me.

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

Sidebar

Related Questions

I have an xml file with following structure: <table name=tblcats> <row> <Id>3680</Id> <Industry>Associations</Industry> <ParentId>1810</ParentId>
I have the following string: <?xml version=1.0 encoding=utf-8?> <string xmlns=http://tempuri.org/UKash/Service1><UKashTransaction><txCode>99</txCode><txDescription>Failed</txDescription><settleAmount> <settleAmount><transactionId>1341481253EDFC871620</transactionId><changeIssueVoucherNumber> <changeIssueVoucherNumber><changeIssueVoucherCurr> <changeIssueVoucherCurr><changeIssueAmount> <changeIssueAmount><changeIssueExpiryDate>
I have the following TextView in my XML layout file:- <TextView android:layout_width=fill_parent android:layout_height=wrap_content android:text=@string/autolink_test
I have the following contents in my XML file: <items> <item id=1><content><![CDATA[<p>string</p>]]></content></item> </items> I
I have configured in following way that spring MVC app using Spring 3.1.1.RELEASE web.xml
I have the following script that I want to insert into a table, but
I have the following XML Parsing code in my application: public static XElement Parse(string
I have a query that strips data from a XML string, inserts it into
I have the following code in C# Visual Studio 2010. string connectionString = Provider=Microsoft.Jet.OLEDB.4.0;Data
I have some XML that stores column information and row data from a table

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.