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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:52:23+00:00 2026-05-27T23:52:23+00:00

In the app I’m currently working with the user is allowed to store a

  • 0

In the app I’m currently working with the user is allowed to store a lot of settings divided in different categories in XML files.

The XML could look like

<settings>
    <setting2>
        <setting3>
            <value1>foo</value1>
            <value2>bar</value2>
        </setting3>
        <value3>A list of strings</value3>
    </setting2>
    <setting4>
        <value4>An integer</value4>
    </setting4>
</settings>

The thing I’m confused about is how to best structure the class containing this information, I started out by doing a recursive class containing a list of categories and values, and now I remembered that there is a tree collection class in Java and something like that would be the best solution?
What do you guys recommend?

  • 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-27T23:52:24+00:00Added an answer on May 27, 2026 at 11:52 pm

    Why not just load the entire XML file into an XPathDocument? It’s easy to use and quite speedy.

    You could access individual settings like so:

    XPathDocument xmldoc = new XPathDocument(settingsFile);
    XPathNavigator nav = xmldoc.CreateNavigator();
    
    foreach (XPathNavigator node in nav.Select("settings/setting2/setting3"))
    {
       ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

App I'm working on uses ARC. I wanted it to process large files, so
The app I am working on is supporting android 2.3 upwards. As the download
My app has very different UI structures for each orientation. At what stage in
App::import('model','User'); $user_model = new User(); $xxx = $user_model->find(all, array(fields=>array(User.yyy))); $zzz = $user_model->find(count, array(fields =>
App has fragment activity with framelayout container matching parent. User interacts with fragments ui
App Store We have been developing an app for quite some time now for
App with Facebook SDK SSO was working fine in 2.2, now upgraded Samsung Galaxy
The app I'm working on is relatively simple but it is throwing memory warnings.
App having screen1, screen2, screen3 , screen4 user can go to screen3 from remaining
App store approval guideline says that Apps that send Push Notifications without first obtaining

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.