Now it's apparent that it's a question about Java programming (or at least programming in some unstated language) and XML. So I will move it to the XML forum. In the meantime you should clarify what you mean by "an XML code". Is that code which writes out data in XML format? Code which reads data in an XML format?