Class LElement
java.lang.Object
io.jenkins.plugins.xmleditor.core.model.LNode
io.jenkins.plugins.xmleditor.core.model.LParent
io.jenkins.plugins.xmleditor.core.model.LElement
- All Implemented Interfaces:
LItem
An element, stored as the pieces of its source text: name, attributes (each with its own spacing and quotes),
the whitespace before
> or />, children and the exact end tag.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttribute(LAttribute attribute) endTag()The exact end tag (e.g.name()namespaceUri(String prefix) Resolves a namespace prefix (""for the default namespace) using the declarations in scope.prefix()voidremoveAttribute(LAttribute attribute) booleanvoidvoidsetSelfClosing(boolean selfClosing) Switches between<a/>and<a></a>.Whitespace between the last attribute (or the name) and>//>.voidwrite(StringBuilder out)
-
Constructor Details
-
LElement
-
-
Method Details
-
name
-
prefix
-
localName
-
attributes
-
attribute
-
addAttribute
-
removeAttribute
-
startTagTail
Whitespace between the last attribute (or the name) and>//>. -
selfClosing
public boolean selfClosing() -
setSelfClosing
public void setSelfClosing(boolean selfClosing) Switches between<a/>and<a></a>. Opening a self-closing element drops whitespace before/>unless it contains a line break (multi-line start tags keep their layout). -
endTag
The exact end tag (e.g.</a >), ornullfor a self-closing element. -
setEndTag
-
namespaceUri
Resolves a namespace prefix (""for the default namespace) using the declarations in scope.- Returns:
- the URI,
""for "no namespace", ornullwhen the prefix is not declared
-
write
-