Code example for Text

Methods: getNodeValue

0
      write(node, tabs);
    } 
  } 
 
  private void writeText(Text text) throws Exception {
    String nodeValue = text.getNodeValue();
    write(nodeValue.trim());
  } 
 
  private void writeCdata(CDATASection cData) throws Exception {
    String cDataText = "<![CDATA[" + cData.getNodeValue() + "]]>";
    write(cDataText);
  } 
 
  private void write(Node node, int tabs) throws Exception {
    if (node instanceof Element)
      write((Element) node, tabs);
    else if (node instanceof CDATASection)
      writeCdata((CDATASection) node);
    else if (node instanceof Text)
Contextual code suggestions in your IDE  Get Codota for Java