@param node a node @return the xml representation according to the setting of this serializer @throws IOException in case of problem saving resources
(final DomElement node)
| 104 | * @throws IOException in case of problem saving resources |
| 105 | */ |
| 106 | public String asXml(final DomElement node) throws IOException { |
| 107 | builder_.setLength(0); |
| 108 | indent_.setLength(0); |
| 109 | final SgmlPage page = node.getPage(); |
| 110 | if (null != page && page.isHtmlPage()) { |
| 111 | final Charset charsetName = page.getCharset(); |
| 112 | if (charsetName != null && node instanceof HtmlHtml) { |
| 113 | builder_.append("<?xml version=\"1.0\" encoding=\"").append(charsetName).append("\"?>\n"); |
| 114 | } |
| 115 | } |
| 116 | printXml(node); |
| 117 | final String response = builder_.toString(); |
| 118 | builder_.setLength(0); |
| 119 | return response; |
| 120 | } |
| 121 | |
| 122 | protected void printXml(final DomElement node) throws IOException { |
| 123 | if (!isExcluded(node)) { |
nothing calls this directly
no test coverage detected