public abstract class SpinXmlElement extends SpinXmlNode<SpinXmlElement>
| Constructor and Description |
|---|
SpinXmlElement() |
| Modifier and Type | Method and Description |
|---|---|
abstract SpinXmlElement |
append(java.util.Collection<SpinXmlElement> childElements)
Appends child elements to this
element. |
abstract SpinXmlElement |
append(SpinXmlElement... childElements)
Appends child elements to this
element. |
abstract SpinXmlElement |
appendAfter(SpinXmlElement childElement,
SpinXmlElement existingChildElement)
|
abstract SpinXmlElement |
appendBefore(SpinXmlElement childElement,
SpinXmlElement existingChildElement)
Appends a child element to this element before the existing child element.
|
abstract SpinXmlAttribute |
attr(java.lang.String attributeName)
Returns the wrapped attribute for an empty namespace and the given name.
|
abstract SpinXmlElement |
attr(java.lang.String attributeName,
java.lang.String value)
Sets the attribute value in the local namespace of this element.
|
abstract java.util.List<java.lang.String> |
attrNames()
Returns all names of the attributes of this element.
|
abstract java.util.List<java.lang.String> |
attrNames(java.lang.String namespace)
Returns all names of the attributes in the given namespace.
|
abstract SpinXmlAttribute |
attrNs(java.lang.String namespace,
java.lang.String attributeName)
Returns the wrapped attribute for the given namespace and name.
|
abstract SpinXmlElement |
attrNs(java.lang.String namespace,
java.lang.String attributeName,
java.lang.String value)
Sets the attribute value in the given namespace.
|
abstract SpinList<SpinXmlAttribute> |
attrs()
Returns all wrapped attributes of this element.
|
abstract SpinList<SpinXmlAttribute> |
attrs(java.lang.String namespace)
Returns all wrapped attributes for the given namespace.
|
abstract SpinXmlElement |
childElement(java.lang.String elementName)
Returns a single wrapped child element for the given name
in the local namespace of this element.
|
abstract SpinXmlElement |
childElement(java.lang.String namespace,
java.lang.String elementName)
Returns a single wrapped child
element for the given namespace
and name. |
abstract SpinList<SpinXmlElement> |
childElements()
Returns all child elements of this
elements. |
abstract SpinList<SpinXmlElement> |
childElements(java.lang.String elementName)
Returns all child
elements with a given name in the local namespace
of this element. |
abstract SpinList<SpinXmlElement> |
childElements(java.lang.String namespace,
java.lang.String elementName)
Returns all child
elements with a given namespace and name. |
abstract boolean |
hasAttr(java.lang.String attributeName)
Checks whether this element has a attribute with an empty namespace and the given name.
|
abstract boolean |
hasAttrNs(java.lang.String namespace,
java.lang.String attributeName)
Checks whether this element has a attribute with the given namespace and name.
|
abstract SpinXmlElement |
remove(java.util.Collection<SpinXmlElement> childElements)
Removes all child elements from this element.
|
abstract SpinXmlElement |
remove(SpinXmlElement... childElements)
Removes all child elements from this element.
|
abstract SpinXmlElement |
removeAttr(java.lang.String attributeName)
Removes the attribute with an empty namespace.
|
abstract SpinXmlElement |
removeAttrNs(java.lang.String namespace,
java.lang.String attributeName)
Removes the attribute under the given namespace.
|
abstract SpinXmlElement |
replace(SpinXmlElement newChildElement)
Replaces this element by an new one.
|
abstract SpinXmlElement |
replaceChild(SpinXmlElement existingChildElement,
SpinXmlElement newChildElement)
Replaces an existing child element with a new one.
|
abstract java.lang.String |
textContent()
Returns the text content of an element.
|
abstract SpinXmlElement |
textContent(java.lang.String textContent)
Sets the text content of an element.
|
abstract java.lang.String |
toString()
Returns the wrapped XML element as string representation.
|
abstract void |
writeToWriter(java.io.Writer writer)
Writes the wrapped XML element to a existing writer.
|
abstract SpinXPathQuery |
xPath(java.lang.String expression)
Creates a XPath query on this element.
|
hasNamespace, hasPrefix, mapTo, mapTo, name, namespace, prefixpublic abstract boolean hasAttr(java.lang.String attributeName)
attributeName - the name of the attributejava.lang.IllegalArgumentException - if the attributeName is nullpublic abstract SpinXmlAttribute attr(java.lang.String attributeName)
attributeName - the name of the attributeattributejava.lang.IllegalArgumentException - if the attributeName is nullSpinXmlAttributeException - if the attribute is not foundpublic abstract SpinXmlElement attr(java.lang.String attributeName, java.lang.String value)
attributeName - the name of the attributevalue - the value to setelementjava.lang.IllegalArgumentException - if the attributeName or value is nullpublic abstract SpinXmlElement removeAttr(java.lang.String attributeName)
attributeName - the name of the attributeelementjava.lang.IllegalArgumentException - if the attributeName is nullpublic abstract boolean hasAttrNs(java.lang.String namespace,
java.lang.String attributeName)
namespace - the namespace of the attributeattributeName - the name of the attributejava.lang.IllegalArgumentException - if the attributeName is nullpublic abstract SpinXmlAttribute attrNs(java.lang.String namespace, java.lang.String attributeName)
namespace - the namespace of the attributeattributeName - the name of the attributeattributejava.lang.IllegalArgumentException - if attributeName or value is nullSpinXmlElementImplementationException - if the attribute cannot be set in the underlying implementationpublic abstract SpinXmlElement attrNs(java.lang.String namespace, java.lang.String attributeName, java.lang.String value)
namespace - the namespace of the attributeattributeName - the name of the attributevalue - the value to setelementjava.lang.IllegalArgumentException - if attributeName or value is nullSpinXmlElementImplementationException - if the attribute cannot be set in the underlying implementationpublic abstract SpinXmlElement removeAttrNs(java.lang.String namespace, java.lang.String attributeName)
namespace - the namespace of the attributeattributeName - the name of the attributeelementjava.lang.IllegalArgumentException - if the attributeName is nullpublic abstract SpinList<SpinXmlAttribute> attrs()
public abstract SpinList<SpinXmlAttribute> attrs(java.lang.String namespace)
namespace - the namespace of the attributespublic abstract java.util.List<java.lang.String> attrNames()
public abstract java.util.List<java.lang.String> attrNames(java.lang.String namespace)
public abstract java.lang.String textContent()
public abstract SpinXmlElement textContent(java.lang.String textContent)
textContent - the text content to setelementjava.lang.IllegalArgumentException - if the textContent is nullpublic abstract SpinXmlElement childElement(java.lang.String elementName)
elementName - the element nameelementjava.lang.IllegalArgumentException - if the elementName is nullSpinXmlElementException - if none or more than one child element is foundpublic abstract SpinXmlElement childElement(java.lang.String namespace, java.lang.String elementName)
element for the given namespace
and name.namespace - the namespace of the elementelementName - the element nameelementjava.lang.IllegalArgumentException - if the elementName is nullSpinXmlElementException - if none or more than one child element is foundpublic abstract SpinList<SpinXmlElement> childElements()
elements.elementspublic abstract SpinList<SpinXmlElement> childElements(java.lang.String elementName)
elements with a given name in the local namespace
of this element.elementName - the element nameelementsjava.lang.IllegalArgumentException - if the element name is nullSpinXmlElementException - if no child element was foundpublic abstract SpinList<SpinXmlElement> childElements(java.lang.String namespace, java.lang.String elementName)
elements with a given namespace and name.namespace - the namespace of the elementelementName - the element nameelementsjava.lang.IllegalArgumentException - if the element name is nullSpinXmlElementException - if no child element was foundpublic abstract SpinXmlElement append(SpinXmlElement... childElements)
element.childElements - the child elements to appendelementjava.lang.IllegalArgumentException - if the childElements is null or one of themSpinXmlElementImplementationException - if a child element cannot be appended in the underlying implementationpublic abstract SpinXmlElement append(java.util.Collection<SpinXmlElement> childElements)
element.childElements - the child elements to appendelementjava.lang.IllegalArgumentException - if the childElements is null or one of themSpinXmlElementImplementationException - if a child element cannot be appended in the underlying implementationpublic abstract SpinXmlElement appendBefore(SpinXmlElement childElement, SpinXmlElement existingChildElement)
childElement - the child element to appendexistingChildElement - the child element to append beforeelementjava.lang.IllegalArgumentException - if the child element or existing child element is nullSpinXmlElementException - if the existing child element is not a child of this elementSpinXmlElementImplementationException - if the new child element cannot be inserted in the underlying implementationpublic abstract SpinXmlElement appendAfter(SpinXmlElement childElement, SpinXmlElement existingChildElement)
childElement - the child element to appendexistingChildElement - the child element to append afterelementjava.lang.IllegalArgumentException - if the child element or existing child element is nullSpinXmlElementException - if the existing child element is not a child of this elementSpinXmlElementImplementationException - if the new child element cannot be inserted in the underlying implementationpublic abstract SpinXmlElement remove(SpinXmlElement... childElements)
childElements - the child elements to removeelementjava.lang.IllegalArgumentException - if child elements is null or any of themSpinXmlElementException - if one of the child elements does not existSpinXmlElementImplementationException - if the child element cannot be removed in the underlying implementationpublic abstract SpinXmlElement remove(java.util.Collection<SpinXmlElement> childElements)
childElements - the child elements to removeelementjava.lang.IllegalArgumentException - if child elements is null or any of themSpinXmlElementException - if one of the child elements does not existSpinXmlElementImplementationException - if the child element cannot be removed in the underlying implementationpublic abstract SpinXmlElement replace(SpinXmlElement newChildElement)
newChildElement - the new elementelementjava.lang.IllegalArgumentException - if the new element is null or has the wrong typeSpinXmlElementException - if this element has no parent elementSpinXmlElementImplementationException - if the element cannot be replaced in the underlying implementationpublic abstract SpinXmlElement replaceChild(SpinXmlElement existingChildElement, SpinXmlElement newChildElement)
existingChildElement - the existing child element to replacenewChildElement - the new child elementelementjava.lang.IllegalArgumentException - if any of the child elements is nullSpinXmlElementException - if the existing element is not a child element of thisSpinXmlElementImplementationException - if the child cannot be replaced in the underlying implementationpublic abstract SpinXPathQuery xPath(java.lang.String expression)
expression - the XPath expressionpublic abstract java.lang.String toString()
toString in class Spin<SpinXmlElement>SpinXmlElementException - if the element cannot be transformed or no new transformer can be createdpublic abstract void writeToWriter(java.io.Writer writer)
writeToWriter in class Spin<SpinXmlElement>writer - the writer to write toSpinXmlElementException - if the element cannot be transformed or no new transformer can be createdCopyright © 2014–2022 Camunda Services GmbH. All rights reserved.