/** * This method is used to commit all nodes on the stack up to and * including the specified node. This will effectively create end * tags for any nodes that are currently open up to the specified * element. Once committed the output node can no longer be used * to create child elements, nor can any of its child elements. * * @param parent this is the node that is to be committed */ public void commit(OutputNode parent) throws Exception { if(stack.contains(parent)) { OutputNode top = stack.top(); if(!isCommitted(top)) { writeStart(top); } while(stack.top() != parent) { writeEnd(stack.pop()); } writeEnd(parent); stack.pop(); } }
/** * This method is used to commit all nodes on the stack up to and * including the specified node. This will effectively create end * tags for any nodes that are currently open up to the specified * element. Once committed the output node can no longer be used * to create child elements, nor can any of its child elements. * * @param parent this is the node that is to be committed */ public void commit(OutputNode parent) throws Exception { if(stack.contains(parent)) { OutputNode top = stack.top(); if(!isCommitted(top)) { writeStart(top); } while(stack.top() != parent) { writeEnd(stack.pop()); } writeEnd(parent); stack.pop(); } }
/** * This method is used to commit all nodes on the stack up to and * including the specified node. This will effectively create end * tags for any nodes that are currently open up to the specified * element. Once committed the output node can no longer be used * to create child elements, nor can any of its child elements. * * @param parent this is the node that is to be committed */ public void commit(OutputNode parent) throws Exception { if(stack.contains(parent)) { OutputNode top = stack.top(); if(!isCommitted(top)) { writeStart(top); } while(stack.top() != parent) { writeEnd(stack.pop()); } writeEnd(parent); stack.pop(); } }
return writeStart(parent, name); if(stack.contains(parent)) { OutputNode top = stack.top();
return writeStart(parent, name); if(stack.contains(parent)) { OutputNode top = stack.top();
return writeStart(parent, name); if(stack.contains(parent)) { OutputNode top = stack.top();