private static final ElementNode createElementNode(XElementNode xElNode,
Hierarchy hierarchy) {
Element element = null;
XElement xElement = xElNode.getElement();
if(xElement.getElementType().equals(XElementType.VIRTUAL)) {
element = new VirtualElementImpl(xElement.getName(), hierarchy);
}else
element = hierarchy.getElementById(xElNode.getElement().getId());
ElementNode node = new ElementNode(element);
addChildren(node, xElNode, hierarchy);
return node;