Modifier and Type | Field and Description |
---|---|
static NodeFilter<Element> |
ELEMENT_FILTER |
Constructor and Description |
---|
Element(Parent parent,
String name) |
Element(Parent parent,
String name,
Namespace ns) |
Element(String name) |
Element(String name,
Namespace ns) |
Element(Token token) |
clearNodes, getNode, getNodes, getNodes, hasNodes, nodeCount, nodeIndexOf, removeNode, removeNode, toString, toXML
public static final NodeFilter<Element> ELEMENT_FILTER
public Token getStartToken()
public int getStartOffset()
public int getEndOffset()
public String getBeginName()
public String getEndName()
public Element setEndName(String endName)
public String getPostSpace()
public String getName()
public Parent getParent()
Child
public Element setParent(Parent parent)
Child
CAUTION: If the child is already attached to a parent, this
call will not detach the old relation! You
must call child.getParent().removeNode (child)
,
first!
public Element addNode(Node node)
addNode
in interface Parent
addNode
in class NodeWithChildren
public Element addNode(int index, Node node)
addNode
in interface Parent
addNode
in class NodeWithChildren
public Element addNodes(Collection<? extends Node> nodes)
addNodes
in interface Parent
addNodes
in class NodeWithChildren
public Element addNodes(int index, Collection<? extends Node> nodes)
addNodes
in interface Parent
addNodes
in class NodeWithChildren
public Element addNodes(Node... nodes)
addNodes
in interface Parent
addNodes
in class NodeWithChildren
public Element addNodes(int index, Node... nodes)
addNodes
in interface Parent
addNodes
in class NodeWithChildren
public Element setCompactEmpty(boolean compactEmpty)
public boolean isCompactEmpty()
public Element toXML(XMLWriter writer) throws IOException
Node
toXML
in interface Node
toXML
in class NodeWithChildren
IOException
public XMLTokenizer.Type getType()
Node
public Element getChild(int index)
public boolean hasChildren()
public Element clearChildNodes()
public Element clearChildren()
public String getText()
TextNode
public String getTrimmedText()
public String getNormalizedText()
public Element setText(String text)
TextNode
public Element clearText()
public Element getParentElement()
public String getNodePath()
Child
getNodePath
in interface Child
public String getChildPath()
public int childIndexOf(Element element)
public Document getDocument()
public Element getChild(String path)
Parent
public Element createClone()
Node
createClone
in interface Node
public Element copy(Node orig)
Node
orig
into this
copy
in interface Node
copy
in class NodeWithChildren
public Element copy()
Node
copy
in interface Node
copy
in class NodeWithChildren
public void setNamespace(Namespace namespace)
public Namespace getNamespace()
Copyright © 2008–2021. All rights reserved.