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 79k
  • Answers 79k
  • 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
  • Editorial Team
    Editorial Team added an answer I see this when I hit Ctrl-F5 because the URL… May 11, 2026 at 4:11 pm
  • Editorial Team
    Editorial Team added an answer I have tested the following and this does work. The… May 11, 2026 at 4:11 pm
  • Editorial Team
    Editorial Team added an answer Try using Eval instead of Bind for the ImageUrl -… May 11, 2026 at 4:11 pm

Related Questions

I'm trying to figure out how to open the system preferred editor for a
At work we are currently still using JUnit 3 to run our tests. We
I am using unfuddle to host some private projects, unfuddle is an excellent solution
We are currently designing a website that will be accessed from kiosks in a

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.