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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:41:00+00:00 2026-05-10T13:41:00+00:00

At work we are being asked to create XML files to pass data to

  • 0

At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the XML file.

The sample I came up with is essentially something like:

<INVENTORY>    <ITEM serialNumber='something' location='something' barcode='something'>       <TYPE modelNumber='something' vendor='something'/>     </ITEM> </INVENTORY> 

The other team said that this was not industry standard and that attributes should only be used for meta data. They suggested:

<INVENTORY>    <ITEM>       <SERIALNUMBER>something</SERIALNUMBER>       <LOCATION>something</LOCATION>       <BARCODE>something</BARCODE>       <TYPE>          <MODELNUMBER>something</MODELNUMBER>          <VENDOR>something</VENDOR>       </TYPE>    </ITEM> </INVENTORY> 

The reason I suggested the first is that the size of the file created is much smaller. There will be roughly 80000 items that will be in the file during transfer. Their suggestion in reality turns out to be three times larger than the one I suggested. I searched for the mysterious ‘Industry Standard’ that was mentioned, but the closest I could find was that XML attributes should only be used for meta data, but said the debate was about what was actually meta data.

After the long winded explanation (sorry) how do you determine what is meta data, and when designing the structure of an XML document how should you decide when to use an attribute or an element?

  • 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. 2026-05-10T13:41:01+00:00Added an answer on May 10, 2026 at 1:41 pm

    I use this rule of thumb:

    1. An Attribute is something that is self-contained, i.e., a color, an ID, a name.
    2. An Element is something that does or could have attributes of its own or contain other elements.

    So yours is close. I would have done something like:

    EDIT: Updated the original example based on feedback below.

      <ITEM serialNumber='something'>       <BARCODE encoding='Code39'>something</BARCODE>       <LOCATION>XYX</LOCATION>       <TYPE modelNumber='something'>          <VENDOR>YYZ</VENDOR>       </TYPE>    </ITEM> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Jeff's reason for disliking properties is because they look like… May 11, 2026 at 10:49 am
  • added an answer Declaration: No. It doesn't make sense to talk about declaring… May 11, 2026 at 10:49 am
  • added an answer Try using TempData. It is like a single-shot session object.… May 11, 2026 at 10:49 am

Related Questions

At work we are being asked to create XML files to pass data to
At work we are currently still using JUnit 3 to run our tests. We
At my work we are running a group of tests that consist of about
We are using PowerDesigner at work for database modelling. But there is a hell
Update: We are still using XP at work and I got my solution working,
Here at work, we are working on a newsletter system that our clients can
We are ready to start a brand new project at work, no legacy code.
We use a grid control from Infragistics at work. Are there others? Pay or
As part of our current database work, we are looking at a dealing with
At work we have an application to play 2K (2048*1556px) OpenEXR film sequences. It

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.