gavincangan — 2014-01-27T00:01:37-05:00 — #1
How about this format?
I've been asked to include this as a test case in an assignment. What do you think?
mittineague — 2014-01-27T12:15:18-05:00 — #2
Hi gavincangan, welcome to the forums
I suppose a lot depends on what Data1, Data2, and Data3 are.
But I don't like the way it's nested at all and I think reusing the "name" tag is an unwise choice.
gavincangan — 2014-01-28T09:30:02-05:00 — #3
I do understand that the formatting looks bad. But I've been asked to take this test case into consideration! So I'll have to handle it anyway
I was just wondering if there was any grammar in XML which prohibited using same tag name in different levels
mittineague — 2014-01-28T10:52:01-05:00 — #4
I have seen a lot of XML that uses the same tag names. But they have different namespaces so they aren't really the same name.
The trouble with the format of your example is that XML is used for transporting data. If someone parses the file for "name" they should be able to get what they want as specifically and as easily as possible. Not knowing which level "name" is at is neither.