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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:39:54+00:00 2026-05-18T12:39:54+00:00

I’m currently working on a website that imports XML data that we download from

  • 0

I’m currently working on a website that imports XML data that we download from another companies ftp site. Its for an online store, so I’m downloading orders, items, item updates.. etc..

Now the XML file for the product listing looks like a monkey slapped it together. What I mean is, its not generic. Some products have fields that other products don’t in the xml file.

For example one product might have the following…

<Value AttributeID="Color">Orange</Value>
<Value AttributeID="Quantity">1000</Value>
<Value AttributeID="Master Model Header">Air Soft Ammunition</Value>
<Value AttributeID="Master Model Body Copy">

While the next product will have…

<Value AttributeID="Caliber">.177</Value>
<Value AttributeID="Quantity per Box">600</Value>
<Value AttributeID="Master Model Header">Pegable Blister Box BBs</Value>
<Value AttributeID="Master Model Body Copy">

Obviously there are SOME similarities, but not every product is the same. This is my first REAL xml project and I’m not sure how to handle something like this.

I understand that not every product in a store as the same attributes, but even so, the products aren’t categorized in the xml files so I have no way of determining the product “type” and that this product “type” has these specific “attributes” and even if they were categorized, there are thousands of products. I would have to generate a model for each type of product, which could mean thousands of models.

So how do I process these random attributes? How would you go about doing this?

  • 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-18T12:39:54+00:00Added an answer on May 18, 2026 at 12:39 pm

    Any DOM implementation should let you walk the tree and figure out what elements and attributes exist and what values they have.

    From that you can build up a list of possible values for possible attributes and decide how you want them to map onto your own system.

    Then just makes sure that when you import them, you check for new unknown attributes/values and have the system notify you for manual intervention (i.e. additional map functions).

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

Sidebar

Related Questions

No related questions found

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.