node = omfactory.createOMElement(elementName, null,
lastNode.getParent(), this);
((OMNodeEx) lastNode).setNextOMSibling(node);
((OMNodeEx) node).setPreviousOMSibling(lastNode);
} else {
OMContainerEx e = (OMContainerEx) lastNode;
node = omfactory.createOMElement(elementName, null,
(OMElement) lastNode, this);
e.setFirstChild(node);
}
populateOMElement(node);
return node;
}