Uses of Class
org.jdom.Element
Packages that use Element
Package
Description
Classes to represent the components of an XML document.
Classes to build JDOM documents from various sources.
Classes to output JDOM documents to various destinations.
Classes to help with transformations, based on the JAXP TrAX classes.
-
Uses of Element in org.jdom
Modifier and TypeFieldDescriptionprotected Element
Attribute.parent
Parent element, or null if noneModifier and TypeMethodDescriptionElement.addContent
(int index, Collection 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 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.Document.detachRootElement()
Detach the root
from this document.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 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
.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 newAttributes) This sets the attributes of the element.Element.setAttributes
(List 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 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 TypeMethodDescriptionvoid
DefaultJDOMFactory.addNamespaceDeclaration
(Element parent, Namespace additional) void
JDOMFactory.addNamespaceDeclaration
(Element element, Namespace additional) void
UncheckedJDOMFactory.addNamespaceDeclaration
(Element parent, Namespace additional) static String
Verifier.checkNamespaceCollision
(Attribute attribute, Element element) static String
Verifier.checkNamespaceCollision
(Namespace namespace, Element element) 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) void
UncheckedJDOMFactory.setAttribute
(Element parent, Attribute a) protected Attribute
This will set the parent of thisAttribute
.Document.setRootElement
(Element rootElement) This sets the root
for theElement
Document
.ModifierConstructorDescription -
Uses of Element in org.jdom.input
Methods in org.jdom.input that return ElementModifier and TypeMethodDescriptionThis will build a JDOM Element from an existing DOM ElementSAXHandler.getCurrentElement()
Returns the being-parsed element.Methods in org.jdom.input 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.jdom.output
Methods in org.jdom.output with parameters of type ElementModifier and TypeMethodDescriptionvoid
This will output a single JDOM element as a document, firing off the SAX events that have been registered.void
XMLOutputter.output
(Element element, OutputStream out) void
void
XMLOutputter.outputElementContent
(Element element, OutputStream out) This will handle printing out an
's content only, not including its tag, and attributes.Element
void
XMLOutputter.outputElementContent
(Element element, Writer out) This will handle printing out an
's content only, not including its tag, and attributes.Element
XMLOutputter.outputString
(Element element) Return a string representing an element.protected void
XMLOutputter.printAttributes
(Writer out, List attributes, Element parent, XMLOutputter.NamespaceStack namespaces) This will handle printing of a
list.Attribute
protected void
XMLOutputter.printElement
(Writer out, Element element, int level, XMLOutputter.NamespaceStack namespaces) -
Uses of Element in org.jdom.transform
Constructors in org.jdom.transform with parameters of type ElementModifierConstructorDescriptionJDOMSource
(Element source) Creates a JDOM TrAX source wrapping a JDOM element.