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.
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.