/** <p>This will print the <code>Document</code> to the current Writer.</p> * * <p> Warning: using your own Writer may cause the writer's * preferred character encoding to be ignored. If you use * encodings other than UTF8, we recommend using the method that * takes an OutputStream instead. </p> * * <p>Note: as with all Writers, you may need to flush() yours * after this method returns.</p> * * @param doc <code>Document</code> to format. * @throws IOException - if there's any problem writing. **/ public void write(Document doc) throws IOException { writeDeclaration(); if (doc.getDocType() != null) { indent(); writeDocType(doc.getDocType()); } for ( int i = 0, size = doc.nodeCount(); i < size; i++ ) { Node node = doc.node(i); writeNode( node ); } writePrintln(); if ( autoFlush ) { flush(); } }
public Node node(int index) throws IndexOutOfBoundsException { return getWrapped().node(index); }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
/** * Processes the input object in the given mode. If input is a * <code>Node</code>, this will processes all of the children of that * node. If input is a <code>List</code> of <code>Nodes</code>s, these * nodes will be iterated and all children of each node will be processed. * * @param document the input object * @param mode * the mode * @throws Exception * if something goes wrong */ public void applyTemplates(Document document, String mode) throws Exception { Mode mod = ruleManager.getMode(mode); // iterate through all children for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); mod.fireRule(node); } }
Node node = doc.node(i); writeNode(node);
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
public void applyTemplates(Document document) throws Exception { for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); fireRule(node); } }
/** * Processes the input object in the given mode. If input is a * <code>Node</code>, this will processes all of the children of that * node. If input is a <code>List</code> of <code>Nodes</code>s, these * nodes will be iterated and all children of each node will be processed. * * @param document the input object * @param mode * the mode * @throws Exception * if something goes wrong */ public void applyTemplates(Document document, String mode) throws Exception { Mode mod = ruleManager.getMode(mode); // iterate through all children for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); mod.fireRule(node); } }
/** * Processes the input object in the given mode. If input is a * <code>Node</code>, this will processes all of the children of that * node. If input is a <code>List</code> of <code>Nodes</code>s, these * nodes will be iterated and all children of each node will be processed. * * @param document the input object * @param mode * the mode * @throws Exception * if something goes wrong */ public void applyTemplates(Document document, String mode) throws Exception { Mode mod = ruleManager.getMode(mode); // iterate through all children for (int i = 0, size = document.nodeCount(); i < size; i++) { Node node = document.node(i); mod.fireRule(node); } }
/** <p>This will print the <code>Document</code> to the current Writer.</p> * * <p> Warning: using your own Writer may cause the writer's * preferred character encoding to be ignored. If you use * encodings other than UTF8, we recommend using the method that * takes an OutputStream instead. </p> * * <p>Note: as with all Writers, you may need to flush() yours * after this method returns.</p> * * @param doc <code>Document</code> to format. * @throws IOException - if there's any problem writing. **/ public void write(Document doc) throws IOException { writeDeclaration(); if (doc.getDocType() != null) { indent(); writeDocType(doc.getDocType()); } for ( int i = 0, size = doc.nodeCount(); i < size; i++ ) { Node node = doc.node(i); writeNode( node ); } writePrintln(); if ( autoFlush ) { flush(); } }
Node node = doc.node(i); writeNode(node);
Node node = doc.node(i); writeNode(node);
Node node = doc.node(i); writeNode(node);
Node node = doc.node(i); writeNode(node);