public java.io.Serializable fromDOM(Document document) {
		automatonMap.clear();
		Automaton a = createEmptyAutomaton(document);
        Node parent = document.getDocumentElement()
        .getElementsByTagName(AUTOMATON_NAME).item(0);
        if(parent == null) parent = document.getDocumentElement();
        return readAutomaton(parent, document);
      
        
	}