Tag Archives: XML

Prefer JSON over XML for Data Structures

If you are going to exchange data structures between programs you have many choices.  Of these, JSON is the best choice in general, and specifically a better choice than XML, and this post explains why. Read the rest of this entry »

Leave a comment

Posted by on June 1, 2016 in Design


Tags: , ,

3 reasons that XML should be Streamed and never “Stringed”

XML is a text format, and so it is tempting to handle it with the normal String handling capabilities of Java, but there are several reasons that you must never do this.  XML should either be on the disk as a sequence of bytes, or it should be parsed as a DOM tree of decoded string values, but it should never be in a String in its encoded value. Read the rest of this entry »

Leave a comment

Posted by on July 17, 2013 in Coding, Design


Tags: , , , ,

XML Schema Validation, or not?

The question is: should a program that reads a standard XML file format use XML Schema Validation when reading the file to make sure that the file being read is properly formatted?  The answer depends upon a lot of things.  It is certainly NOT a foregone conclusion that you should always validate XML when reading.  There are times when validating will constrain the functionality to an unacceptable degree over the long run. Read the rest of this entry »

Leave a comment

Posted by on March 26, 2012 in Design, practice


Tags: , , , , , ,