OhmageTeam1/Ohmage — pull request #13 by AlphaO (2012-11-18 12:11:08+00:00)
Title: XML PARSER, and Survey Page Changes (DO NOT MERGE UNTIL EVERYONE LOOKS AT IT)

PLEASE DO NOT MERGE UNTIL EVERYONE LOOKS AT IT.

Okay, so here is the XML parser that I found, and hacked a little bit to make it work.

So here is the issue:
Everything works as expected, except for one thing:
Survey items need to be ordered (because that's the order the user will see them when they take the survey). In XML, this is known as the , which can contain , and stuff. When this is converted to JSON, this will be changed into an UNORDERED SET, and not an ORDERED array. This is a problem.

I tried to fix it with some terrible hacky code, and it works. But, its terrible. Horribly terrible. If a boss saw me write this, I'd get fired. That's how terrible it is. SO, I'm asking you guys to take a look, and try to find a better method of fixing this issue. All of my hacks are marked with "// hack for Ohmage" comments.

Thanks, and don't forget, DON'T MERGE THIS YET!!!