Here's the general description of most commonly used XML Tree files format: tree file. Click on the link and do 'view source code' in your browser to see the file. The file is just a list of trees, beginning with <trees> and ending with </trees>. In XML, each element begins with a tag between '<' and '>' and ends with the same tag, with an additional'/'. Comments are set between '<!--' and '-->'. The tree list is compounded of several trees beginning with <tree> and ending with </tree>. A tree is no more than a root node that contains from 0 to n child nodes.

You can see that child nodes are defined with the tag 'node'. I chose to give different name to root node and child nodes. I think it is easiest to distinguish different trees in a file from different child nodes... but you can use the same tag name for both root and child node. Nevertheless, you must keep in mind that the parser considers each node in the list as a single tree... Hence, if your file contains a single tree, it must have only one root node. The 'trees' tag could be discarded since it does not prove very useful... Its existence is due to the XML format that says each document must have a single root element. Hence the 'trees' tag allow you to store more than one tree in a file.

The length and bootstrap values if they exist are passed as parameters to each node using tags with name 'length' and 'bootstrap'. You can add as many attributes as you want to the tree by creating your own tags (attribute_1..i..n). What else?

Finally, note that the tags names may change. These are my own, but many XML Document Type Definition (DTD, the way a document should be structured: tag names and so on) has been proposed to describe phylogenetic and taxonomic data. Nevertheless, the "topology" of the document is the same, only the names of the tags may be different. That's why we introduced a "configurable" parser: You just have to specify the name of the tags you want to use before reading/writing the XML file. You must set the tag names of the elements 'trees', 'tree', 'node', 'length', 'bootstrap' which are needed to build the tree (even if your tree has no length!), and add as many tags as you want, whereas they may be found in your file or not. An unknown attribute will be ignored.
See XML sequence file to find out more about reading or writing a sequence file in XML.