Quote:
Originally posted by jonathan lall
Here's what I mean. This is an example of how a simple XML-based scouting sheet could look:
Code:
<?xml version="1.0" encoding="utf-8"?>
<scoutinfo>
<team number="188" name="Woburn Robotics"></team>
<robot name="Blizzard 3" type="goalbot"></robot>
<goals number="2">excellent</goals>
<balls number="0">N/A</balls>
<traction>excellent</traction>
<speed>good</speed>
<motorpower number="6">excellent</motorpower>
<gearbox type="one-speed"></gearbox>
<gohome boolean="true">poor</gohome>
<comments rating="8">
That's one nice robot. Fairly fast, really powerful, won't let go of goals involuntarily.
</comments>
</scoutinfo>
All elements here are concrete values, whereas the attributes are more subjective. Since it's extensible, missing info shouldn't be a problem. There are a few ways we could do its DTD. All the attribute names are type, name, boolean, and number.
|
Yep. That's what i'll do. And thanks guys; I thought xml was much more involved that what it is. Very easy to do stuff in php.
PS: When outputting the data, should i just do some while( ) {} loops with echos, or are there any special xml output functions in php?
PPS: When people want to dump data from their palm and upload it to the site, should that be in CSV? or can palms (or whoever writes the program) do the dump in xml?