When developing your XML standards you may feel a growing excitement within your stomach to make the XML tags especially long simply because you can. After all, we can only have DB fields that are 10 long so why not indulge, right?
For example, the following XML simply represents a customer number in your database.
<ProductionInventoryCustomerNumber> 1234567 </ProductionInventoryCustomerNumber>
The above took 71 bytes to define a 7 byte customer number – ouch! The same could have been written as follows and still retain the full meaning of the data:
Now that’s much better!
We cut the bytes in half – down to 33! After seeing that one might be saying, “Mr. Krengeltech Developer – we shouldn’t be using XML in the first place if we are trying to conserve on space”. It’s true that XML consumes more bandwidth than other traditional methods of communication, but we still get to practice scrutiny against that excitement we felt earlier. Our general recommendation to the web service community is that XML doesn’t have to use spelled out words to fill the void it was meant for. Besides, there are other ways to resurrect that initial excitement mentioned above – like spinning around in your office chair 100 times and then quickly getting up in an attempt to try and run across the office without running into anything. <grin>