Uses of Class
org.jdom2.Element
Packages that use Element
Package
Description
Classes representing the components of an XML document.
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.
Classes to build JDOM documents from various sources.
Support classes for building JDOM documents and content using SAX parsers.
Extended JDOM Content Classes that contain location coordinates.
Classes to output JDOM documents to various destinations.
Classes used to implement output functionality that are not part of the
actual Output API, but rather part of the implementation.
Classes to help with transformations, based on the JAXP TrAX classes.
Classes that implement useful functionality, but are not easy to categorise.
-
Uses of Element in org.jdom2
Modifier and TypeFieldDescriptionprotected Element
Attribute.parent
The parent to which this Attribute belongs.Modifier and TypeMethodDescriptionElement.addContent
(int index, Collection<? extends Content> newContent) Inserts the content in a collection into the content list at the given index.Element.addContent
(int index, Content child) Inserts the child into the content list at the given index.Element.addContent
(String str) This adds text content to this element.Element.addContent
(Collection<? extends Content> newContent) Appends all children in the given collection to the end of the content list.Element.addContent
(Content child) Appends the child to the end of the element's content list.Element.clone()
This returns a deep clone of this element.Element.detach()
Document.detachRootElement()
Detach the root
from this document.Element
final Element
final Element
final Element
final Element
This will create anElement
in no
.Namespace
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).This will create a newElement
with the supplied (local) name, and specifies the prefix and URI of the
theNamespace
Element
should be in.This will create a newElement
with the supplied (local) name, and define the
to be used.Namespace
This will create anElement
in no
.Namespace
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).This will create a newElement
with the supplied (local) name, and specifies the prefix and URI of the
theNamespace
Element
should be in.This will create a newElement
with the supplied (local) name, and define the
to be used.Namespace
This returns the first child element within this element with the given local name and belonging to no namespace.This returns the first child element within this element with the given local name and belonging to the given namespace.Attribute.getParent()
This will return the parent of thisAttribute
.EntityRef.getParent()
Text.getParent()
final 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.Document.getRootElement()
This will return the rootElement
for thisDocument
Element.setAttribute
(String name, String value) This sets an attribute value for this element.Element.setAttribute
(String name, String value, Namespace ns) This sets an attribute value for this element.Element.setAttribute
(Attribute attribute) This sets an attribute value for this element.Element.setAttributes
(Collection<? extends Attribute> newAttributes) This sets the attributes of the element.Element.setContent
(int index, Content child) Replace the current child the given index with the supplied child.Element.setContent
(Collection<? extends Content> newContent) This sets the content of the element.Element.setContent
(Content child) Set this element's content to be the supplied child.Sets the (local) name of the element.Element.setNamespace
(Namespace namespace) Sets the element'sNamespace
.Sets the content of the element to be the text given.Modifier and TypeMethodDescriptionElement.getChildren()
This returns aList
of all the child elements nested directly (one level deep) within this element, asElement
objects.Element.getChildren
(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.Element.getChildren
(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.Modifier and TypeMethodDescriptionvoid
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 String
Verifier.checkNamespaceCollision
(Attribute attribute, Element element) static String
Verifier.checkNamespaceCollision
(Attribute attribute, Element element, int ignoreatt) static String
Verifier.checkNamespaceCollision
(Namespace namespace, Element element) static String
Verifier.checkNamespaceCollision
(Namespace namespace, Element element, int ignoreatt) 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
Set this Attribute's parent.void
void
Sets the 'root' Element for a Document.void
Document.setRootElement
(Element rootElement) This sets the root
for theElement
Document
.Modifier and TypeMethodDescriptionvoid
Element.sortChildren
(Comparator<? super Element> comparator) Sort the child Elements of this Element using a mechanism that is safe for JDOM content.ModifierConstructorDescription -
Uses of Element in org.jdom2.filter
Methods in org.jdom2.filter that return ElementModifier and TypeMethodDescriptionCheck to see if the object matches a predefined set of rules.Methods in org.jdom2.filter that return types with arguments of type ElementModifier and TypeMethodDescriptionFilters.element()
Return a Filter that matches anyElement
data.Return a Filter that matches anyElement
data with the specified name.Return a Filter that matches anyElement
data with the specified name and Namespace.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 -
Uses of Element in org.jdom2.input.sax
Methods in org.jdom2.input.sax that return ElementModifier and TypeMethodDescriptionSAXHandler.getCurrentElement()
Returns the being-parsed element.Methods in org.jdom2.input.sax with parameters of type ElementModifier and TypeMethodDescriptionprotected 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.locatedModifier and TypeClassDescriptionclass
This Element specialization contains the location information as parsed.Methods in org.jdom2.located that return ElementModifier and TypeMethodDescription -
Uses of Element in org.jdom2.output
Methods in org.jdom2.output with parameters of type ElementModifier and TypeMethodDescriptionThis converts the JDOMElement
parameter to a DOM Element, returning the DOM version.This converts the JDOMElement
parameter to a DOM Element, returning the DOM version.void
This will output a single JDOM element as a document, firing off the SAX events that have been registered.final void
StAXEventOutputter.output
(Element element, XMLEventConsumer out) final void
StAXStreamOutputter.output
(Element element, XMLStreamWriter out) final void
XMLOutputter.output
(Element element, OutputStream out) final void
final void
StAXEventOutputter.outputElementContent
(Element element, XMLEventConsumer out) This will handle printing out an
's content only, not including its tag, and attributes.Element
final void
StAXStreamOutputter.outputElementContent
(Element element, XMLStreamWriter out) This will handle printing out an
's content only, not including its tag, and attributes.Element
final void
XMLOutputter.outputElementContent
(Element element, OutputStream out) This will handle printing out an
's content only, not including its tag, and attributes.Element
final void
XMLOutputter.outputElementContent
(Element element, Writer out) This will handle printing out an
's content only, not including its tag, and attributes.Element
final String
XMLOutputter.outputElementContentString
(Element element) This will handle printing out an
's content only, not including its tag, and attributes.Element
final 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 ElementModifier and TypeMethodDescriptionprotected Element
AbstractDOMOutputProcessor.printElement
(FormatStack fstack, NamespaceStack nstack, 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
(XMLEventConsumer out, FormatStack fstack, NamespaceStack nstack, XMLEventFactory eventfactory, Element element) This will handle printing of anElement
.protected void
AbstractStAXStreamProcessor.printElement
(XMLStreamWriter out, FormatStack fstack, NamespaceStack nstack, Element element) This will handle printing of anElement
.protected void
AbstractXMLOutputProcessor.printElement
(Writer out, FormatStack fstack, NamespaceStack nstack, Element element) This will handle printing of anElement
.void
void
AbstractStAXEventProcessor.process
(XMLEventConsumer out, Format format, XMLEventFactory eventfactory, Element element) void
AbstractStAXStreamProcessor.process
(XMLStreamWriter out, Format format, Element element) void
This will convert the
using the given DOM Document to create the resulting DOM Element.Element
void
void
StAXEventProcessor.process
(XMLEventConsumer out, Format format, XMLEventFactory eventfactory, Element element) void
StAXStreamProcessor.process
(XMLStreamWriter out, Format format, Element element) void
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 ElementModifierConstructorDescriptionJDOMSource
(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