Document document = XmlUtil.createDocument(PROCESS_DIAGRAM_ELEMENT_NAME, null);
Element root = document.getDocumentElement();
addAttribute(root, NAME_ATTRIBUTE_NAME, definition.getName());
addAttribute(root, NOTATION_ATTRIBUTE_NAME, definition.getNotation());
Dimension dimension = definition.getDimension();
addAttribute(root, WIDTH_ATTRIBUTE_NAME, String.valueOf(dimension.width));
addAttribute(root, HEIGHT_ATTRIBUTE_NAME, String.valueOf(dimension.height));
addAttribute(root, SHOW_ACTIONS_NAME, String.valueOf(definition.isShowActions()));
addAttribute(root, SHOW_GRID_NAME, String.valueOf(definition.isShowGrid()));