* creates document header too and initializes
* the cache of already converted nodes.
*/
public boolean write(INode node) throws IOException {
rootState = node.getState();
convertedNodes = new Vector();
if (explicitEncoding == null) {
writeln("<?xml version=\"1.0\"?>");
} else {
writeln("<?xml version=\"1.0\" encoding=\"" + explicitEncoding + "\"?>");