what's the difference between xml files that use xml elements vs tags with a bunch of attributes?
Posted on 2004-09-07
I thought xml files were suppose to structured so that they were like this:
but my co-worker say they are easier to work with and just as good if you structure them like this:
<Person @name="Pete Smith" @age=23 </>
<Person @name="Mary Jones" @age=45 </>
What's the difference? We are going to need to use a lot of SQL like selection of different records from the xml files. Does one method make this easier? What about xpath, the attributes method seems easier to find data no?
What about schemas and validation of the xml, which method is better for enforcing data validity?
Curious to hear what experienced developers have to say. Thank you for sharing and helping.