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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:22:50+00:00 2026-06-13T17:22:50+00:00

I have to store some entities (amazon nodes), which have id and name properties

  • 0

I have to store some entities (amazon nodes), which have id and name properties
A node may or may not have sub nodes.
Sub nodes too consists the id and name.

There’s no limit to nesting. A sub node can have sub nodes and that sub node can have sub nodes of its own.

I chose to save this in json ( I am comfortable working with json )

e.g.
A History node has subnodes architecture and landmarks.

Here’s how I am storing this in json.

[
    {
            "id"   : "14278871",
            "name" : "History"
            "sub" : [
                {
                    "id"   : "173508",
                    "name" : "Architecture"

                },
                {
                    "id"   : "1000",
                    "name" : "Landmarks"
                }
            ]

        }
]

But it seems to be too much of data. Can someone provide me a better way ?

In xml, I came up with this,

<history id="14278871">
    <architecture id="173508"></architecture>
    <landmarks id="1000"></landmarks>
</history>

I am looking for better ways to store this data.

Ultimately, I need to use this data in php.

  • 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-13T17:22:51+00:00Added an answer on June 13, 2026 at 5:22 pm

    The difference between your two formats isn’t really the data structure, it’s that you’ve switched the name fields from being data to being keys. The analogous JSON to your XML would be:

    { "history" :
       { "id": "14289981",
         "sub": {
            "architecture" : { "id" : "173508" },
            "landmarks" : { "id" : "1000" }
         }
       }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on an application which will store some entities which have name,
I have some entities with relationships: component name=Store persistent=true { property name=Products fieldtype=one-to-many cfc=Product;
I have a generated nested Array which I store some data. How can i
i use CoreData to store datas, and i have got some entities. how can
I have certain objects in my domain which are not aggregate roots/entities, yet I
Because of memory constrains, I have to store some pairs of values in an
I have one postgresql table where I store some stories from different sites. At
I have C# application that must store some information into MS SQL that would
I have a class in c# in that store some user messages, and return
I have created an application that uses settings.settings to store some user specific settings

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.