blob: d168fa6c588e03a704591b2fd468379828f09386 (
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
29
|
package org.zwobble.mammoth.xml;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import java.util.List;
import java.util.Map;
public class XmlNodes {
public static XmlElement element(String name) {
return element(name, ImmutableList.of());
}
public static XmlElement element(String name, Map<String, String> attributes) {
return element(name, attributes, ImmutableList.of());
}
public static XmlElement element(String name, List<XmlNode> children) {
return element(name, ImmutableMap.of(), children);
}
public static XmlElement element(String name, Map<String, String> attributes, List<XmlNode> children) {
return new XmlElement(name, attributes, children);
}
public static XmlTextNode text(String value) {
return new XmlTextNode(value);
}
}
|