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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:12:46+00:00 2026-06-07T04:12:46+00:00

I am in the process of writing some code to parse questions into objects.

  • 0

I am in the process of writing some code to parse questions into objects. I am using NSXMLParser. The problem is, I also formatted my own XML data, and I think it is incorrect.

<?xml version="1.0" encoding="UTF-8"?>
<factor value="1">
    <key value="plus">
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>

    </key>
    <key value="minus">
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>

    </key>
</factor>
<factor value="2">
    <key value="plus">
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
    </key>
    <key value="minus">
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
        <question>PLACEHOLDER_TEXT</question>
    </key>
</factor>

That is the xml im am parsing. Halfway through the questions, the parser gives me
Error Domain=NSXMLParserErrorDomain Code=5 "The operation couldn’t be completed. (NSXMLParserErrorDomain error 5.)"

My Question: How can I format this so that the entire document is parsed correctly. The end result is to have a question managed object with attributes of:key, and factor.

  • 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-07T04:12:47+00:00Added an answer on June 7, 2026 at 4:12 am

    I would recommend putting all your <factor> into a root tag called <factors> so you can iterate over it to get all your <factor>

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

Sidebar

Related Questions

Currently in the process of writing some TCP socket code and running into a
I am in the process of writing some validation code based on these assumptions:
I am trying to fully understand the process pro writing code in some language
I'm in the process of writing a jQuery plugin, and am getting into some
I'm writing some code that needs to process an arbitrary number of lists of
I'm writing some pretty CPU-intensive, concurrent numerical code that will process large amounts of
I'm in the process of writing some epub creation functionality using php5. Currently I
I'm writing some server code that talks to a client process via STDIN. I'm
I'm in the process of re-writing some code whilst maintaining the external interface. The
So I have a very weird problem. I am writing some code in VB.Net

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.