IParentNode parent = node.getIParentNode();
if (parent != null && parent.getBuilder() != null) {
switch (parent.getState()) {
case IParentNode.DISCARDED:
((StAXBuilder)parent.getBuilder()).debugDiscarded(parent);
throw new NodeUnavailableException();
case IParentNode.INCOMPLETE:
do {
OMContainerHelper.buildNext(parent);
} while (parent.getState() == IParentNode.INCOMPLETE
&& (nextSibling = node.getNextOMSiblingIfAvailable()) == null);