Advertisement

Quick XML survey


| Comments (23) | Views (0)

Please help one of my RIT classmates by answering his one-question XML survey. Cheers!

Update: Although I welcome any discussion about this topic in the comments, if you plan to take the short survey please wait until after you respond to read the comments. I wouldn't want anything that anyone says about it to influence your answer.

23 Comments

Surprised at how close that survey is.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Aye, me too.

I am definitely on the side of elements over attributes. While using attributes yields much tighter data, XML that consists of mostly elements is much easier to glance at and see pretty quickly the structure and content of the document. Also, I've found manipulating XML with code is a bit more involved when working with attributes.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

I hope you dont mind, jay, but in this case I voted for attributes. It was short piece and did not ask general opinion of which way is "better programming".

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

=) Of course I don't mind.
It is a question about what is easier to read, and there are no wrong answers. ;)

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

had to be elements. i learnt to mod with an element based game and it just seems easier to look at

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Thanks for posting this, Jay. I was having some small issues w/updating some features and hadn't planned on such a great response rate, so if anything weird happened it should be fixed now =)

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

wow 50/50

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Interesting that the question is about "easiest to read". I bet if a single 'record' in attribute style had to span different lines you'd get a different balance.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

I thought the element based code was easier to understand, but the attribute code would be better for longer entries.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Difficult to choose. I actually find them equally readable. In the end I leaned slightly towards attribute. It would be interesting to try the same survey with a larger piece of code, with more attributes.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply
twistofreality Author Profile Page January 29, 2006 10:29 PM

I agree that I think the survey would have different results if one or more of the elements had several more attributes. Can someone enlighten us regarding the details of the survey? It very well may be true that, "Attribute-based XML is easier to read than element-based XML when elements have few attributes," but that does not in any way validate that, "Attribute-based XML is easier to read than element-based XML." I just wrapped up a statistics class, so the particulars (hypothesis, population, etc.) would be of some interest to me and, I'd imagine, some other of this site's visitors.

In any case, glad we could help with the survey!

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

I can clear up a few things as per your request.

The reason I made it short is because I didn't want any reading fatigue to become a reason why people would vote for one over the other. If I put out long chunks of XML, I was concerned that they would get through whichever was the first and not care about the second.

They were short because it presented the basic functionality of each type and I didn't feel that length would necessarily demonstrate the legibility any more than a short example. All I wanted was for people to see how each one is presented, gain a good idea, and then make a quick decision on the legibility of it.

Also, the realistic scenario may or may not be that more or less attributes exist. I, again, wanted to show the basic framework without an information overload.

All of the points discussed here are valid, don't get me wrong. I would love to make corrections, but as there are now quite a few people (570+ at this point :) and making those corrections would skew the data.

The entire point of this survey is an assignment for a grad class I'm in that evaluates, quite possibly obviously, the differences - including positives and negatives - of attribute vs. element-based XML. I also plan on measuring parse times for large XML files of both attribute-style and element-style documents in JavaScript to see time differences and which is faster.

The conclusion of the project will be a lab paper about the comparisons between the two and the tests used to compare them. If you have some more questions, I'd be happy to answer them. I plan on posting a link to the paper once I've written it so anyone can feel like following up if it so interests them =)

Thanks again to all of you for taking the survey, it's giving me a lot of interesting data to work with and these comments are also helpful and, as long as no one outrightly objects, I may quote them in my paper with attribution. I'll keep everyone up to date just for the sake of it =)

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

As others have said, i think the short length of the sample doesn't really help out this survey. In just *this* example I think they're both equally readable. However when attribute based xml starts spanning multiple lines it (at least to me) starts to look like a large blob of text. I have trouble finding the elements that i'm looking for. That said, i rarely read that much xml, it's for the computer to use, not me, if it parses 20% faster, then i'd be all for it.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Let's keep in mind that I am a computer retard, but neither one of those meant jack squat to me.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply
twistofreality Author Profile Page January 30, 2006 6:13 AM

Brendyn-- I've never worked much with XML, but your paper sounds really fascinating. I started to learn it once a while ago, but it got superceded by other things. I'll most likely pick it up again in the no too distant future, though, so that type of analysis will most certainly help if I ever have to choose a coding style. Maybe Jay would be willing to post a link to the paper somewhere on the main page when the paper's completed? I doubt I'll think to check back to these comments periodically to see if it's done. Thanks for all of the information!

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Woooow I seriously am surprised, too. I always opt for one-liners in describing things so I keep the info together and can find it easier. Keeps it clean, too. Of course, it drives some programming people nuts trying to get through it, but it seems to make sense to me (my Java teacher hated me). I kinda keep in mind, though, that the people that it actually did make sense to were born networkers, like me, and seemed to prefer the same style. Scientifically it may not have too much to do with it, but at least it's an excuse ("shush, I don't care if you don't like it, I'm not a programmer"). ~lol~

But dang, in over 950 people, it's 50-50. Eye-opening. =)

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Attribute, I find, is much easier to read than Element-based XML; however, I would find the element format much easier to code in (thanks to its logical outline-like hierarchy).

Based on the literal phrasing of the survey's question, I voted that Attribute-based XML is (by far) easier to read.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

It depends somewhat on what you are reading for. IE, if I wanted to quickly see what the overall structure of the document was, the attribute version would be easier. But if I was quickly scanning through the text for giraffes, I'd find the element version easier.

Personally I think XML is horribly ugly and difficult to read regardless of how it's structured. Mostly this is because there is no sensible way to ident it. I think things like json and yaml are big improvements as far as readablity, especially for relatively simple data.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Attributes all the way. Especially when using serialization under .NET, writing for attributes is about as easy as writing for elements, and if you are WRITING the xml, it is much more intuitive.

Personally, I tend to use elements when I am creating detailed or mostly independant subobjects, and obviously for lists; for instance:

red

Chandler
earthworm


Joey
flatworm

true

I find that the above is far more tedious both to read and to write, and when the objects get more complex, even good indentation is not always enough to really make it clear what's happening. For that reason, attributes can simplify the structure significantly:



Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Elements - maybe I've been doing this too long, but they virtually jump off the page and tell you what's going on - I really need to concentrate to read the attributes. I'd be interested to hear how this compares with how they parse though, after all I'm not the intended audience for an XML file (well not normally at any rate).

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

Hi all,

For those that are interested, I posted a link to the write-up (pdf) on the survey page (and also closed down the survey). Cheers!

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

636 found Element-style XML to be more legible while 637 liked attributes. So, yes, my vote was important, now we have scientific proof that elements are bad and should be abandoned and attributes are way to go :)

Score: 0 (0 votes) Vote up Vote down Report this comment Reply
twistofreality Author Profile Page January 31, 2006 4:44 PM

Interesting paper! Thanks for the link. I'll keep that in mind when I set out to learn XML.

Score: 0 (0 votes) Vote up Vote down Report this comment Reply

^ Scroll Up | Homepage >

Leave a comment [top of page]

    Please consider creating a Casual Gameplay account if you're a regular visitor here, as it will allow us to create an even better experience for you. Sign-up here!
  • PLEASE UNDERSTAND SITE POLICIES BEFORE POSTING COMMENTS
  • You may use limited HTML tags for style:
    (a href, b, br/, strong, em, ul, ol, li, code, spoiler)
    HTML tags begin with a less-than sign: < and end with a greater-than sign: >. Always. No exceptions.
  • To post spoilers, please use spoiler tags: <spoiler> example </spoiler>
    If you need help understanding spoiler tags, read the spoiler help.
  • Please Preview your comment before posting, especially when using spoilers!
  • No link dropping, no domains as names; do not spam, and do not advertise! (rel="nofollow" in use)
1,029 Views
3 Comments
Caves Online> Johnny123 An online platform game that pits you against the "ghosts" of players who've run the course before you. Use the arrow keys to jump, dodge and collect gold as you avoid lava pits, skeletons and the ever-sliding view.  ...
394 Views
1 Comment
Primary Max> Lori.h Play around in Max's clone lab and test out his new machine by solving puzzles. Use your clones as stepping stools and button pushers but make sure they get back, as you find your exit, to prevent a time paradox.  ...
372 Views
0 Comments
Manor Memoirs> starchild Scarlett has just moved into an old, decrepit manor, looking for inspiration for her new book. But who can write in a house that's falling apart? That's where you come in. As a seasoned interior decorator/garage sale organiser, you will do your best to raise money to renovate the old place. Manor Memoirs is a wonderfully sweet hidden-object/time management hybrid that's guaranteed to make you smile.  ...
2,855 Views
14 Comments
History Museum Escape> Dora Trapped overnight in the history museum, if you want to escape you'll need to solve puzzles and craft some pretty darned clever tools in this short but sweet game also available free for iOS and Android.  ...

Recent Comments

 

Display 5 more comments
Limit to the last 5 comments

Casual game of the week

Mystery Trackers: Blackrow's Secret

Browser game of the week

Gridland

Mobile game of the week

History Museum Escape

Your Favorite Games edit

add
Save links to your favorite games here. Use the Favorites editor.

Popular on JiG


The Room

Virtual Villagers: Origins

Submachine 9: The Temple

Surgeon Simulator 2013

The House 2

Papa's pastaria

Fireboy and Watergirl 4: The Crystal Temple

Fireboy and Watergirl 3: The Ice Temple

Moonchild

The Royal Trap

Loren the Amazon Princess

1931: Scheherazade at the Library of Pergamum

Magical Diary

Heileen Series

Visit our great partner: maxcdn!

Monthly Archives

Legal notice

All games mentioned or hosted and images appearing on JayIsGames are Copyright their respective owner(s).

All other content is Copyright ©2003-2014 JayIsGames.com. All Rights Reserved.