throw new RuntimeException("INTERNAL ERROR"); // Por si acaso
if (content instanceof Node) // Nodo concreto
{
Node childNode = (Node)content;
if (itsNatDoc.isDebugMode() && DOMUtilInternal.isNodeBoundToDocumentTree(childNode))
throw new ItsNatDOMException("Child nodes removed from a disconnected node cannot be reinserted in a different place on load phase and fast mode",childNode);
parentNode.appendChild(childNode);
}
else
{
@SuppressWarnings("unchecked")
LinkedList<Node> nodeList = (LinkedList<Node>)content;
Iterator<Node> itChildNodes = nodeList.iterator();
DocumentFragment childNodesFragment = (DocumentFragment)itChildNodes.next(); // Sabemos que el primero es el DocumentFragment que se le dio al usuario
while(itChildNodes.hasNext())
{
Node childNode = itChildNodes.next();
if (itsNatDoc.isDebugMode() && DOMUtilInternal.isNodeBoundToDocumentTree(childNode))
throw new ItsNatDOMException("Child nodes removed from a disconnected node cannot be reinserted in a different place on load phase and fast mode",childNode);
parentNode.appendChild(childNode);
}
// Al mismo tiempo que los insertamos se eliminaron en teor�a del DocumentFragment que se dio al usuario y que los conten�a,
// lo comprobamos
if (childNodesFragment.hasChildNodes())
throw new ItsNatDOMException("DocumentFragment containing the child nodes removed from a disconnected node cannot be reinserted in a different place on load phase and fast mode",childNodesFragment);
}
}
}
}