Iterator children = container.getChildren();
while (children.hasNext()) {
((OMNodeEx) children.next()).internalSerialize(writer, true);
}
} else {
OMNodeEx child = (OMNodeEx)container.getFirstOMChild();
while (child != null) {
if ((!(child instanceof OMElement)) || child.isComplete() ||
((OMElement)child).getBuilder() == null) {
child.internalSerialize(writer, false);
} else {
OMElement element = (OMElement) child;
element.getBuilder().setCache(false);
serializeByPullStream(element, writer, cache);
}
child = (OMNodeEx)child.getNextOMSiblingIfAvailable();
}
}
}