TransformerFactory tfactory = TransformerFactory.newInstance();
// This creates a transformer that does a simple identity transform,
// and thus can be used for all intents and purposes as a serializer.
try
{
serializer = tfactory.newTransformer();
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
serializer.setOutputProperty(OutputKeys.METHOD, "xml");
serializer.setOutputProperty(OutputKeys.ENCODING, Constants
.getXMLEncoding());
if ((systemID != null) && (systemID.length() > 0))