@param node a node @return the text representation according to the setting of this serializer
(final DomNode node)
| 150 | * @return the text representation according to the setting of this serializer |
| 151 | */ |
| 152 | public String asText(final DomNode node) { |
| 153 | builder_.setLength(0); |
| 154 | |
| 155 | if (node instanceof DomText text) { |
| 156 | builder_.append(text.getData()); |
| 157 | } |
| 158 | else { |
| 159 | printText(node); |
| 160 | } |
| 161 | |
| 162 | final String response = builder_.toString(); |
| 163 | builder_.setLength(0); |
| 164 | return response; |
| 165 | } |
| 166 | |
| 167 | /** |
| 168 | * Prints the text content from this node and all children. |