Uses of Class
org.jdom2.Element
-
Packages that use Element Package Description org.jdom2 Classes representing the components of an XML document.org.jdom2.filter Classes to both filter and generically type-cast nodes of a document based on type, name, value, or other aspects, and to boolean AND/OR/NEGATE these rules.org.jdom2.input Classes to build JDOM documents from various sources.org.jdom2.input.sax Support classes for building JDOM documents and content using SAX parsers.org.jdom2.located Extended JDOM Content Classes that contain location coordinates.org.jdom2.output Classes to output JDOM documents to various destinations.org.jdom2.output.support Classes used to implement output functionality that are not part of the actual Output API, but rather part of the implementation.org.jdom2.transform Classes to help with transformations, based on the JAXP TrAX classes.org.jdom2.util Classes that implement useful functionality, but are not easy to categorise. -
-
Uses of Element in org.jdom2
Fields in org.jdom2 declared as Element Modifier and Type Field Description protected Element
Attribute. parent
The parent to which this Attribute belongs.Methods in org.jdom2 that return Element Modifier and Type Method Description Element
Element. addContent(int index, java.util.Collection<? extends Content> newContent)
Inserts the content in a collection into the content list at the given index.Element
Element. addContent(int index, Content child)
Inserts the child into the content list at the given index.Element
Element. addContent(java.lang.String str)
This adds text content to this element.Element
Element. addContent(java.util.Collection<? extends Content> newContent)
Appends all children in the given collection to the end of the content list.Element
Element. addContent(Content child)
Appends the child to the end of the element's content list.Element
Element. clone()
This returns a deep clone of this element.Element
Element. detach()
Element
Document. detachRootElement()
Detach the root
from this document.Element
Element
DefaultJDOMFactory. element(int line, int col, java.lang.String name)
Element
DefaultJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String uri)
Element
DefaultJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String prefix, java.lang.String uri)
Element
DefaultJDOMFactory. element(int line, int col, java.lang.String name, Namespace namespace)
Element
DefaultJDOMFactory. element(java.lang.String name)
Element
DefaultJDOMFactory. element(java.lang.String name, java.lang.String uri)
Element
DefaultJDOMFactory. element(java.lang.String name, java.lang.String prefix, java.lang.String uri)
Element
DefaultJDOMFactory. element(java.lang.String name, Namespace namespace)
Element
JDOMFactory. element(int line, int col, java.lang.String name)
This will create anElement
in no
.Namespace
Element
JDOMFactory. element(int line, int col, java.lang.String name, java.lang.String uri)
This will create a newElement
with the supplied (local) name, and specifies the URI of the
theNamespace
Element
should be in, resulting it being unprefixed (in the default namespace).Element
JDOMFactory. element(int line, int col, java.lang.String name, java.lang.String prefix, java.lang.String uri)
This will create a newElement
with the supplied (local) name, and specifies the prefix and URI of the
theNamespace
Element
should be in.Element
JDOMFactory. element(int line, int col, java.lang.String name, Namespace namespace)
This will create a newElement
with the supplied (local) name, and define the
to be used.Namespace
Element
JDOMFactory. element(java.lang.String name)
This will create anElement
in no
.Namespace
Element
JDOMFactory. element(java.lang.String name, java.lang.String uri)
This will create a newElement
with the supplied (local) name, and specifies the URI of the
theNamespace
Element
should be in, resulting it being unprefixed (in the default namespace).Element
JDOMFactory. element(java.lang.String name, java.lang.String prefix, java.lang.String uri)
This will create a newElement
with the supplied (local) name, and specifies the prefix and URI of the
theNamespace
Element
should be in.Element
JDOMFactory. element(java.lang.String name, Namespace namespace)
This will create a newElement
with the supplied (local) name, and define the
to be used.Namespace
Element
SlimJDOMFactory. element(int line, int col, java.lang.String name)
Element
SlimJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String uri)
Element
SlimJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String prefix, java.lang.String uri)
Element
SlimJDOMFactory. element(int line, int col, java.lang.String name, Namespace namespace)
Element
UncheckedJDOMFactory. element(int line, int col, java.lang.String name)
Element
UncheckedJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String uri)
Element
UncheckedJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String prefix, java.lang.String uri)
Element
UncheckedJDOMFactory. element(int line, int col, java.lang.String name, Namespace namespace)
Element
Element. getChild(java.lang.String cname)
This returns the first child element within this element with the given local name and belonging to no namespace.Element
Element. getChild(java.lang.String cname, Namespace ns)
This returns the first child element within this element with the given local name and belonging to the given namespace.Element
Attribute. getParent()
This will return the parent of thisAttribute
.Element
EntityRef. getParent()
Element
Text. getParent()
Element
Content. getParentElement()
A convenience method that returns any parent element for this element, or null if the element is unattached or is a root element.Element
Document. getRootElement()
This will return the rootElement
for thisDocument
Element
Element. setAttribute(java.lang.String name, java.lang.String value)
This sets an attribute value for this element.Element
Element. setAttribute(java.lang.String name, java.lang.String value, Namespace ns)
This sets an attribute value for this element.Element
Element. setAttribute(Attribute attribute)
This sets an attribute value for this element.Element
Element. setAttributes(java.util.Collection<? extends Attribute> newAttributes)
This sets the attributes of the element.Element
Element. setContent(int index, Content child)
Replace the current child the given index with the supplied child.Element
Element. setContent(java.util.Collection<? extends Content> newContent)
This sets the content of the element.Element
Element. setContent(Content child)
Set this element's content to be the supplied child.Element
Element. setName(java.lang.String name)
Sets the (local) name of the element.Element
Element. setNamespace(Namespace namespace)
Sets the element'sNamespace
.Element
Element. setText(java.lang.String text)
Sets the content of the element to be the text given.Methods in org.jdom2 that return types with arguments of type Element Modifier and Type Method Description java.util.List<Element>
Element. getChildren()
This returns aList
of all the child elements nested directly (one level deep) within this element, asElement
objects.java.util.List<Element>
Element. getChildren(java.lang.String cname)
This returns aList
of all the child elements nested directly (one level deep) within this element with the given local name and belonging to no namespace, returned asElement
objects.java.util.List<Element>
Element. getChildren(java.lang.String cname, Namespace ns)
This returns aList
of all the child elements nested directly (one level deep) within this element with the given local name and belonging to the given Namespace, returned asElement
objects.Methods in org.jdom2 with parameters of type Element Modifier and Type Method Description void
DefaultJDOMFactory. addNamespaceDeclaration(Element parent, Namespace additional)
void
JDOMFactory. addNamespaceDeclaration(Element element, Namespace additional)
Adds a namespace declaration to an Elementvoid
UncheckedJDOMFactory. addNamespaceDeclaration(Element parent, Namespace additional)
static java.lang.String
Verifier. checkNamespaceCollision(Attribute attribute, Element element)
static java.lang.String
Verifier. checkNamespaceCollision(Attribute attribute, Element element, int ignoreatt)
static java.lang.String
Verifier. checkNamespaceCollision(Namespace namespace, Element element)
static java.lang.String
Verifier. checkNamespaceCollision(Namespace namespace, Element element, int ignoreatt)
Document
DefaultJDOMFactory. document(Element rootElement)
Document
DefaultJDOMFactory. document(Element rootElement, DocType docType)
Document
DefaultJDOMFactory. document(Element rootElement, DocType docType, java.lang.String baseURI)
Document
JDOMFactory. document(Element rootElement)
Document
JDOMFactory. document(Element rootElement, DocType docType)
Document
JDOMFactory. document(Element rootElement, DocType docType, java.lang.String baseURI)
Document
UncheckedJDOMFactory. document(Element rootElement)
Document
UncheckedJDOMFactory. document(Element rootElement, DocType docType)
Document
UncheckedJDOMFactory. document(Element rootElement, DocType docType, java.lang.String baseURI)
boolean
Element. isAncestor(Element element)
Determines if this element is the ancestor of another element.void
DefaultJDOMFactory. setAttribute(Element parent, Attribute a)
void
JDOMFactory. setAttribute(Element element, Attribute a)
Sets a specific Attribute on an Elementvoid
UncheckedJDOMFactory. setAttribute(Element parent, Attribute a)
protected Attribute
Attribute. setParent(Element parent)
Set this Attribute's parent.void
DefaultJDOMFactory. setRoot(Document doc, Element root)
void
JDOMFactory. setRoot(Document doc, Element root)
Sets the 'root' Element for a Document.void
UncheckedJDOMFactory. setRoot(Document doc, Element root)
Document
Document. setRootElement(Element rootElement)
This sets the root
for theElement
Document
.Method parameters in org.jdom2 with type arguments of type Element Modifier and Type Method Description void
Element. sortChildren(java.util.Comparator<? super Element> comparator)
Sort the child Elements of this Element using a mechanism that is safe for JDOM content.Constructors in org.jdom2 with parameters of type Element Constructor Description Document(Element rootElement)
Document(Element rootElement, DocType docType)
Document(Element rootElement, DocType docType, java.lang.String baseURI)
-
Uses of Element in org.jdom2.filter
Methods in org.jdom2.filter that return Element Modifier and Type Method Description Element
ElementFilter. filter(java.lang.Object content)
Check to see if the object matches a predefined set of rules.Methods in org.jdom2.filter that return types with arguments of type Element Modifier and Type Method Description static Filter<Element>
Filters. element()
Return a Filter that matches anyElement
data.static Filter<Element>
Filters. element(java.lang.String name)
Return a Filter that matches anyElement
data with the specified name.static Filter<Element>
Filters. element(java.lang.String name, Namespace ns)
Return a Filter that matches anyElement
data with the specified name and Namespace.static Filter<Element>
Filters. element(Namespace ns)
Return a Filter that matches anyElement
data with the specified Namespace. -
Uses of Element in org.jdom2.input
Methods in org.jdom2.input that return Element Modifier and Type Method Description Element
DOMBuilder. build(org.w3c.dom.Element domElement)
This will build a JDOM Element from an existing DOM Element -
Uses of Element in org.jdom2.input.sax
Methods in org.jdom2.input.sax that return Element Modifier and Type Method Description Element
SAXHandler. getCurrentElement()
Returns the being-parsed element.Methods in org.jdom2.input.sax with parameters of type Element Modifier and Type Method Description protected void
SAXHandler. pushElement(Element element)
Pushes an element onto the tree under construction. -
Uses of Element in org.jdom2.located
Subclasses of Element in org.jdom2.located Modifier and Type Class Description class
LocatedElement
This Element specialization contains the location information as parsed.Methods in org.jdom2.located that return Element Modifier and Type Method Description Element
LocatedJDOMFactory. element(int line, int col, java.lang.String name)
Element
LocatedJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String uri)
Element
LocatedJDOMFactory. element(int line, int col, java.lang.String name, java.lang.String prefix, java.lang.String uri)
Element
LocatedJDOMFactory. element(int line, int col, java.lang.String name, Namespace namespace)
-
Uses of Element in org.jdom2.output
Methods in org.jdom2.output with parameters of type Element Modifier and Type Method Description org.w3c.dom.Element
DOMOutputter. output(Element element)
This converts the JDOMElement
parameter to a DOM Element, returning the DOM version.org.w3c.dom.Element
DOMOutputter. output(org.w3c.dom.Document basedoc, Element element)
This converts the JDOMElement
parameter to a DOM Element, returning the DOM version.void
SAXOutputter. output(Element node)
This will output a single JDOM element as a document, firing off the SAX events that have been registered.void
StAXEventOutputter. output(Element element, javax.xml.stream.util.XMLEventConsumer out)
void
StAXStreamOutputter. output(Element element, javax.xml.stream.XMLStreamWriter out)
void
XMLOutputter. output(Element element, java.io.OutputStream out)
void
XMLOutputter. output(Element element, java.io.Writer out)
void
StAXEventOutputter. outputElementContent(Element element, javax.xml.stream.util.XMLEventConsumer out)
This will handle printing out an
's content only, not including its tag, and attributes.Element
void
StAXStreamOutputter. outputElementContent(Element element, javax.xml.stream.XMLStreamWriter out)
This will handle printing out an
's content only, not including its tag, and attributes.Element
void
XMLOutputter. outputElementContent(Element element, java.io.OutputStream out)
This will handle printing out an
's content only, not including its tag, and attributes.Element
void
XMLOutputter. outputElementContent(Element element, java.io.Writer out)
This will handle printing out an
's content only, not including its tag, and attributes.Element
java.lang.String
XMLOutputter. outputElementContentString(Element element)
This will handle printing out an
's content only, not including its tag, and attributes.Element
java.lang.String
XMLOutputter. outputString(Element element)
Return a string representing anElement
. -
Uses of Element in org.jdom2.output.support
Methods in org.jdom2.output.support with parameters of type Element Modifier and Type Method Description protected org.w3c.dom.Element
AbstractDOMOutputProcessor. printElement(FormatStack fstack, NamespaceStack nstack, org.w3c.dom.Document basedoc, Element element)
This will handle printing of anElement
.protected void
AbstractSAXOutputProcessor. printElement(SAXTarget out, FormatStack fstack, NamespaceStack nstack, Element element)
This will handle printing of anElement
.protected void
AbstractStAXEventProcessor. printElement(javax.xml.stream.util.XMLEventConsumer out, FormatStack fstack, NamespaceStack nstack, javax.xml.stream.XMLEventFactory eventfactory, Element element)
This will handle printing of anElement
.protected void
AbstractStAXStreamProcessor. printElement(javax.xml.stream.XMLStreamWriter out, FormatStack fstack, NamespaceStack nstack, Element element)
This will handle printing of anElement
.protected void
AbstractXMLOutputProcessor. printElement(java.io.Writer out, FormatStack fstack, NamespaceStack nstack, Element element)
This will handle printing of anElement
.org.w3c.dom.Element
AbstractDOMOutputProcessor. process(org.w3c.dom.Document basedoc, Format format, Element element)
void
AbstractSAXOutputProcessor. process(SAXTarget out, Format format, Element element)
void
AbstractStAXEventProcessor. process(javax.xml.stream.util.XMLEventConsumer out, Format format, javax.xml.stream.XMLEventFactory eventfactory, Element element)
void
AbstractStAXStreamProcessor. process(javax.xml.stream.XMLStreamWriter out, Format format, Element element)
void
AbstractXMLOutputProcessor. process(java.io.Writer out, Format format, Element element)
org.w3c.dom.Element
DOMOutputProcessor. process(org.w3c.dom.Document basedoc, Format format, Element element)
This will convert the
using the given DOM Document to create the resulting DOM Element.Element
void
SAXOutputProcessor. process(SAXTarget out, Format format, Element element)
void
StAXEventProcessor. process(javax.xml.stream.util.XMLEventConsumer out, Format format, javax.xml.stream.XMLEventFactory eventfactory, Element element)
void
StAXStreamProcessor. process(javax.xml.stream.XMLStreamWriter out, Format format, Element element)
void
XMLOutputProcessor. process(java.io.Writer out, Format format, Element element)
void
AbstractSAXOutputProcessor. processAsDocument(SAXTarget out, Format format, Element node)
void
SAXOutputProcessor. processAsDocument(SAXTarget out, Format format, Element element)
-
Uses of Element in org.jdom2.transform
Constructors in org.jdom2.transform with parameters of type Element Constructor Description JDOMSource(Element source)
Creates a JDOM TrAX source wrapping a JDOM element. -
Uses of Element in org.jdom2.util
Methods in org.jdom2.util with parameters of type Element Modifier and Type Method Description void
NamespaceStack. push(Element element)
Create a new in-scope level for the Stack based on an Element.
-