public final class DocumentElement extends XMLElement
XMLElement.Factory, XMLElement.Handler
Modifier and Type | Field and Description |
---|---|
static String |
ID_ATTRIBUTE
ID attribute
|
static String |
IF_ATTRIBUTE
If attribute.
|
static String |
IF_FALSE_ATTRIBUTE
If attribute.
|
static String |
IF_TRUE_ATTRIBUTE
If attribute.
|
static Pattern |
ILLEGAL_PATTERN
Illegal characters pattern.
|
static String |
LANG_ATTRIBUTE
Lang attribute.
|
static String |
NAME_ATTRIBUTE
Name attribute.
|
static String |
SELF_REFERENCE
Self reference.
|
static String |
UNLESS_ATTRIBUTE
Unless attribute.
|
static String |
USAGE_ATTRIBUTE
Usage attribute.
|
static String |
UUID_ATTRIBUTE
UUID attribute.
|
Modifier and Type | Method and Description |
---|---|
XMLElement |
copy()
Creates a copy of this element.
|
boolean |
equals(Object other) |
Optional<String> |
getAttributeValue(String name,
Optional<String> defaultValue)
Gets an attribute's value by its name.
|
List<DocumentElement> |
getChildren()
Gets the element's children.
|
List<DocumentElement> |
getChildren(String name)
Gets the element's children with a specific name.
|
XMLElement.Factory |
getFactory()
Gets the xml element factory.
|
String |
getText()
Gets the element's text.
|
int |
hashCode() |
addChild, addChild, addText, containsAttribute, disownChildren, escape, getAttributeCount, getAttributes, getChild, getChildCount, getChildNames, getFirstChild, getName, getParent, getPath, isNameEmpty, removeAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setName, toString
public static final String ID_ATTRIBUTE
public static final String IF_ATTRIBUTE
public static final String IF_FALSE_ATTRIBUTE
public static final String IF_TRUE_ATTRIBUTE
public static final Pattern ILLEGAL_PATTERN
public static final String LANG_ATTRIBUTE
public static final String NAME_ATTRIBUTE
public static final String SELF_REFERENCE
public static final String UNLESS_ATTRIBUTE
public static final String USAGE_ATTRIBUTE
public static final String UUID_ATTRIBUTE
public XMLElement copy()
copy
in class XMLElement
public boolean equals(Object other)
equals
in class XMLElement
public Optional<String> getAttributeValue(String name, Optional<String> defaultValue)
getAttributeValue
in class XMLElement
name
- The name of the attribute.defaultValue
- The value to return if the attribute is not present.public List<DocumentElement> getChildren()
getChildren
in class XMLElement
public List<DocumentElement> getChildren(String name)
getChildren
in class XMLElement
name
- The children's name.public XMLElement.Factory getFactory()
getFactory
in class XMLElement
public String getText()
getText
in class XMLElement
public int hashCode()
hashCode
in class XMLElement
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.