aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/xml/XmlNodes.java
blob: ce366153a57a576d96ea24eefb89fdbcb9bc5982 (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
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);
    }
}