Class Element
- java.lang.Object
-
- org.camunda.bpm.engine.impl.util.xml.Element
-
public class Element extends java.lang.Object
Represents one XML element.- Author:
- Tom Baeyens, Joram Barrez
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,Attribute>
attributeMap
protected int
column
protected java.util.List<Element>
elements
protected int
line
protected java.lang.String
tagName
protected java.lang.StringBuilder
text
protected java.lang.String
uri
-
Constructor Summary
Constructors Constructor Description Element(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes, org.xml.sax.Locator locator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Element element)
void
appendText(java.lang.String text)
Due to the nature of SAX parsing, sometimes the characters of an element are not processed at once.java.lang.String
attribute(java.lang.String name)
java.lang.String
attribute(java.lang.String name, java.lang.String defaultValue)
java.lang.String
attributeNS(Namespace namespace, java.lang.String name)
java.lang.String
attributeNS(Namespace namespace, java.lang.String name, java.lang.String defaultValue)
java.util.Set<java.lang.String>
attributes()
void
collectIds(java.util.List<java.lang.String> ids)
allows to recursively collect the ids of all elements in the tree.protected java.lang.String
composeMapKey(java.lang.String attributeUri, java.lang.String attributeName)
Element
element(java.lang.String tagName)
Element
elementNS(Namespace nameSpace, java.lang.String tagName)
java.util.List<Element>
elements()
java.util.List<Element>
elements(java.lang.String tagName)
protected java.util.List<Element>
elementsNS(java.lang.String nameSpaceUri, java.lang.String tagName)
java.util.List<Element>
elementsNS(Namespace nameSpace, java.lang.String tagName)
int
getColumn()
int
getLine()
java.lang.String
getTagName()
java.lang.String
getText()
java.lang.String
getUri()
java.lang.String
toString()
-
-
-
Field Detail
-
uri
protected java.lang.String uri
-
tagName
protected java.lang.String tagName
-
attributeMap
protected java.util.Map<java.lang.String,Attribute> attributeMap
-
line
protected int line
-
column
protected int column
-
text
protected java.lang.StringBuilder text
-
elements
protected java.util.List<Element> elements
-
-
Method Detail
-
elements
public java.util.List<Element> elements(java.lang.String tagName)
-
elementsNS
public java.util.List<Element> elementsNS(Namespace nameSpace, java.lang.String tagName)
-
elementsNS
protected java.util.List<Element> elementsNS(java.lang.String nameSpaceUri, java.lang.String tagName)
-
element
public Element element(java.lang.String tagName)
-
add
public void add(Element element)
-
attribute
public java.lang.String attribute(java.lang.String name)
-
attributes
public java.util.Set<java.lang.String> attributes()
-
attributeNS
public java.lang.String attributeNS(Namespace namespace, java.lang.String name)
-
attribute
public java.lang.String attribute(java.lang.String name, java.lang.String defaultValue)
-
attributeNS
public java.lang.String attributeNS(Namespace namespace, java.lang.String name, java.lang.String defaultValue)
-
composeMapKey
protected java.lang.String composeMapKey(java.lang.String attributeUri, java.lang.String attributeName)
-
elements
public java.util.List<Element> elements()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getUri
public java.lang.String getUri()
-
getTagName
public java.lang.String getTagName()
-
getLine
public int getLine()
-
getColumn
public int getColumn()
-
appendText
public void appendText(java.lang.String text)
Due to the nature of SAX parsing, sometimes the characters of an element are not processed at once. So instead of a setText operation, we need to have an appendText operation.
-
getText
public java.lang.String getText()
-
collectIds
public void collectIds(java.util.List<java.lang.String> ids)
allows to recursively collect the ids of all elements in the tree.
-
-