// Decode the board from XML.
ParsedXML root = TinyParser.parseXML(new ByteArrayInputStream(to
.toString().getBytes()));
Enumeration<?> rootChildren = root.elements();
if (!rootChildren.hasMoreElements()) {
throw new ParseException("No children of the root.");
}
ParsedXML rootNode = (ParsedXML) rootChildren.nextElement();
board = BoardEncoder.decode(rootNode, game);
// Save a copy of the board before XML encoding.