
The xml format looks like:
CODE
<?xml version="1.0" ?>
<transactions>
<transaction_58887076>
<id>58887076</id>
<type>Give Inventory</type>
<description></description>
<payment>0</payment>
<time>2006-07-26 22:33:49</time>
<resident>xxx xxxx</resident>
<end_balance>-</end_balance>
</transaction_58887076>
<transaction_58876388>
<id>58876388</id>
<type>Upload Charge</type>
<description></description>
<payment>10</payment>
<time>2006-07-26 21:55:26</time>
<resident>SYSTEM</resident>
<end_balance>xxx</end_balance>
</transaction_58876388>
<transaction_58812627>
<id>58812627</id>
<type>Object Sale</type>
<description>Product X</description>
<deposit>xxx</deposit>
<time>2006-07-26 18:26:18</time>
<resident>xxxx</resident>
<end_balance>xxx</end_balance>
</transaction_58812627>
</transactions>
My question is this. Is there a specific reason that the elements contained within the transactions element are "transaction_{some ID number}" instead of just "transaction"?
The reason I ask is that XML-wise, each transaction_{blah} element is an utterly different thing, not the same type of thing with different data. The ID is already an element of the transaction_{blah} element, and it could be easily added as an attribute:
CODE
<transaction id="123456">...</transaction>
Now, it's no problem to build an xml parser that understands to drop the _{blah} from the tag to determine how to handle things, but before I do, I was just curious as to the rationale for the way the xml is structured.