class TagXMLWriter {

	public void write(final HKXFile hkxFile) throws IOException, TransformerException, ParserConfigurationException {
		TagXMLHandler handler = new TagXMLHandler();
		// Create the new Document
		Document document = handler.createDOM(hkxFile.getContentsVersion(), hkxFile.getClassVersion());
		
		// Create the "__data__" section in the document.
		Element root = handler.createSection(document, "__data__");
		
		TagXMLDataCreator creator = new TagXMLDataCreator(document);
		
		for(HKXObject content : hkxFile.getContentCollection()) {
			Node contentXML = creator.create(content);
			root.appendChild(contentXML);
		}
		handler.writeToFile(document, outFile);
	}

	public  TagXMLWriter(final File outputFile);

}