blob: 34de63ebaf3fac0f949c50e727db06758127d4f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package org.zwobble.mammoth.html;
import java.util.List;
public class HtmlElementNode implements HtmlNode {
private final String tagName;
private final List<HtmlNode> children;
public HtmlElementNode(String tagName, List<HtmlNode> children) {
this.tagName = tagName;
this.children = children;
}
@Override
public void write(StringBuilder builder) {
builder
.append("<")
.append(tagName)
.append(">");
children.forEach(node -> node.write(builder));
builder
.append("</")
.append(tagName)
.append(">");
}
}
|