protected void printXml(final DomElement node) throws IOException { if (!isExcluded(node)) { final boolean hasChildren = node.getFirstChild() != null; builder_.append(indent_).append('<'); printOpeningTag(node); if (!hasChildren && !node.isEmptyXmlTagExpanded()) { builder_.append("/>").append('\n'); } else { builder_.append(">").append('\n'); for (DomNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) { indent_.append(" "); if (child instanceof DomElement) { printXml((DomElement) child); } else { builder_.append(child); } indent_.setLength(indent_.length() - 2); } builder_.append(indent_).append("</").append(node.getTagName()).append('>').append('\n'); } } }
protected void printXml(final DomElement node) throws IOException { if (!isExcluded(node)) { final boolean hasChildren = node.getFirstChild() != null; builder_.append(indent_).append('<'); printOpeningTag(node); if (!hasChildren && !node.isEmptyXmlTagExpanded()) { builder_.append("/>").append('\n'); } else { builder_.append('>').append('\n'); for (DomNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) { indent_.append(" "); if (child instanceof DomElement) { printXml((DomElement) child); } else { builder_.append(child); } indent_.setLength(indent_.length() - 2); } builder_.append(indent_).append("</").append(node.getTagName()).append('>').append('\n'); } } }
protected void printXml(final DomElement node) { if (!isExcluded(node)) { final boolean hasChildren = node.getFirstChild() != null; buffer_.append(indent_).append('<'); printOpeningTag(node); if (!hasChildren && !isEmptyXmlTagExpanded(node)) { buffer_.append("/>").append('\n'); } else { buffer_.append(">").append('\n'); for (DomNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) { indent_.append(" "); if (child instanceof DomElement) { printXml((DomElement) child); } else { buffer_.append(child); } indent_.setLength(indent_.length() - 2); } buffer_.append(indent_).append("</").append(node.getTagName()).append('>').append('\n'); } } }
protected void printXml(final DomElement node) { if (!isExcluded(node)) { final boolean hasChildren = node.getFirstChild() != null; buffer_.append(indent_).append('<'); printOpeningTag(node); if (!hasChildren && !isEmptyXmlTagExpanded(node)) { buffer_.append("/>").append('\n'); } else { buffer_.append(">").append('\n'); for (DomNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) { indent_.append(" "); if (child instanceof DomElement) { printXml((DomElement) child); } else { buffer_.append(child); } indent_.setLength(indent_.length() - 2); } buffer_.append(indent_).append("</").append(node.getTagName()).append('>').append('\n'); } } }
protected void printXml(final DomElement node) { if (!isExcluded(node)) { final boolean hasChildren = node.getFirstChild() != null; buffer_.append(indent_).append('<'); printOpeningTag(node); if (!hasChildren && !isEmptyXmlTagExpanded(node)) { buffer_.append("/>").append('\n'); } else { buffer_.append(">").append('\n'); for (DomNode child = node.getFirstChild(); child != null; child = child.getNextSibling()) { indent_.append(" "); if (child instanceof DomElement) { printXml((DomElement) child); } else { buffer_.append(child); } indent_.setLength(indent_.length() - 2); } buffer_.append(indent_).append("</").append(node.getTagName()).append('>').append('\n'); } } }