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.
|
Modifier and Type | Field and Description |
---|---|
protected Element |
Attribute.parent
The parent to which this Attribute belongs.
|
Modifier and Type | Method and Description |
---|---|
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.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.clone()
This returns a deep clone of this element.
|
Element |
Element.detach() |
Element |
Document.detachRootElement()
Detach the root
from this document. |
Element |
UncheckedJDOMFactory.element(int line,
int col,
java.lang.String name) |
Element |
JDOMFactory.element(int line,
int col,
java.lang.String name)
This will create an
Element in no
. |
Element |
DefaultJDOMFactory.element(int line,
int col,
java.lang.String name) |
Element |
SlimJDOMFactory.element(int line,
int col,
java.lang.String name) |
Element |
UncheckedJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
Element |
JDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace)
This will create a new
Element
with the supplied (local) name, and define
the to be used. |
Element |
DefaultJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
Element |
SlimJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
Element |
UncheckedJDOMFactory.element(int line,
int col,
java.lang.String name,
java.lang.String uri) |
Element |
JDOMFactory.element(int line,
int col,
java.lang.String name,
java.lang.String uri)
This will create a new
Element with
the supplied (local) name, and specifies the URI
of the the Element
should be in, resulting it being unprefixed (in the default
namespace). |
Element |
DefaultJDOMFactory.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 uri) |
Element |
UncheckedJDOMFactory.element(int line,
int col,
java.lang.String name,
java.lang.String prefix,
java.lang.String uri) |
Element |
JDOMFactory.element(int line,
int col,
java.lang.String name,
java.lang.String prefix,
java.lang.String uri)
This will create a new
Element with
the supplied (local) name, and specifies the prefix and URI
of the the Element
should be in. |
Element |
DefaultJDOMFactory.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,
java.lang.String prefix,
java.lang.String uri) |
Element |
JDOMFactory.element(java.lang.String name)
This will create an
Element in no
. |
Element |
DefaultJDOMFactory.element(java.lang.String name) |
Element |
JDOMFactory.element(java.lang.String name,
Namespace namespace)
This will create a new
Element
with the supplied (local) name, and define
the to be used. |
Element |
DefaultJDOMFactory.element(java.lang.String name,
Namespace namespace) |
Element |
JDOMFactory.element(java.lang.String name,
java.lang.String uri)
This will create a new
Element with
the supplied (local) name, and specifies the URI
of the the Element
should be in, resulting it being unprefixed (in the default
namespace). |
Element |
DefaultJDOMFactory.element(java.lang.String name,
java.lang.String uri) |
Element |
JDOMFactory.element(java.lang.String name,
java.lang.String prefix,
java.lang.String uri)
This will create a new
Element with
the supplied (local) name, and specifies the prefix and URI
of the the Element
should be in. |
Element |
DefaultJDOMFactory.element(java.lang.String name,
java.lang.String prefix,
java.lang.String uri) |
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 this
Attribute . |
Element |
Text.getParent() |
Element |
EntityRef.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 root
Element
for this Document |
Element |
Element.setAttribute(Attribute attribute)
This sets an attribute value for this element.
|
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.setAttributes(java.util.Collection<? extends Attribute> newAttributes)
This sets the attributes of the element.
|
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.setContent(int index,
Content child)
Replace the current child the given index with 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's
Namespace . |
Element |
Element.setText(java.lang.String text)
Sets the content of the element to be the text given.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Element> |
Element.getChildren()
This returns a
List of all the child elements
nested directly (one level deep) within this element, as
Element objects. |
java.util.List<Element> |
Element.getChildren(java.lang.String cname)
This returns a
List of all the child elements
nested directly (one level deep) within this element with the given
local name and belonging to no namespace, returned as
Element objects. |
java.util.List<Element> |
Element.getChildren(java.lang.String cname,
Namespace ns)
This returns a
List 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 as
Element objects. |
Modifier and Type | Method and Description |
---|---|
void |
UncheckedJDOMFactory.addNamespaceDeclaration(Element parent,
Namespace additional) |
void |
JDOMFactory.addNamespaceDeclaration(Element element,
Namespace additional)
Adds a namespace declaration to an Element
|
void |
DefaultJDOMFactory.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 |
UncheckedJDOMFactory.document(Element rootElement) |
Document |
JDOMFactory.document(Element rootElement)
|
Document |
DefaultJDOMFactory.document(Element rootElement) |
Document |
UncheckedJDOMFactory.document(Element rootElement,
DocType docType) |
Document |
JDOMFactory.document(Element rootElement,
DocType docType)
|
Document |
DefaultJDOMFactory.document(Element rootElement,
DocType docType) |
Document |
UncheckedJDOMFactory.document(Element rootElement,
DocType docType,
java.lang.String baseURI) |
Document |
JDOMFactory.document(Element rootElement,
DocType docType,
java.lang.String baseURI)
|
Document |
DefaultJDOMFactory.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 |
UncheckedJDOMFactory.setAttribute(Element parent,
Attribute a) |
void |
JDOMFactory.setAttribute(Element element,
Attribute a)
Sets a specific Attribute on an Element
|
void |
DefaultJDOMFactory.setAttribute(Element parent,
Attribute a) |
protected Attribute |
Attribute.setParent(Element parent)
Set this Attribute's parent.
|
void |
UncheckedJDOMFactory.setRoot(Document doc,
Element root) |
void |
JDOMFactory.setRoot(Document doc,
Element root)
Sets the 'root' Element for a Document.
|
void |
DefaultJDOMFactory.setRoot(Document doc,
Element root) |
Document |
Document.setRootElement(Element rootElement)
This sets the root
for the
Document . |
Modifier and Type | Method and 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.
|
Constructor and Description |
---|
Document(Element rootElement)
|
Document(Element rootElement,
DocType docType)
|
Document(Element rootElement,
DocType docType,
java.lang.String baseURI)
|
Modifier and Type | Method and Description |
---|---|
Element |
ElementFilter.filter(java.lang.Object content)
Check to see if the object matches a predefined set of rules.
|
Modifier and Type | Method and Description |
---|---|
static Filter<Element> |
Filters.element()
Return a Filter that matches any
Element data. |
static Filter<Element> |
Filters.element(Namespace ns)
Return a Filter that matches any
Element data with the specified
Namespace. |
static Filter<Element> |
Filters.element(java.lang.String name)
Return a Filter that matches any
Element data with the specified
name. |
static Filter<Element> |
Filters.element(java.lang.String name,
Namespace ns)
Return a Filter that matches any
Element data with the specified
name and Namespace. |
Modifier and Type | Method and Description |
---|---|
Element |
DOMBuilder.build(org.w3c.dom.Element domElement)
This will build a JDOM Element from an existing DOM Element
|
Modifier and Type | Method and Description |
---|---|
Element |
SAXHandler.getCurrentElement()
Returns the being-parsed element.
|
Modifier and Type | Method and Description |
---|---|
protected void |
SAXHandler.pushElement(Element element)
Pushes an element onto the tree under construction.
|
Modifier and Type | Class and Description |
---|---|
class |
LocatedElement
This Element specialization contains the location information as parsed.
|
Modifier and Type | Method and Description |
---|---|
Element |
LocatedJDOMFactory.element(int line,
int col,
java.lang.String name) |
Element |
LocatedJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
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) |
Modifier and Type | Method and Description |
---|---|
org.w3c.dom.Element |
DOMOutputter.output(org.w3c.dom.Document basedoc,
Element element)
This converts the JDOM
Element 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.
|
org.w3c.dom.Element |
DOMOutputter.output(Element element)
This converts the JDOM
Element parameter to a DOM Element,
returning the DOM version. |
void |
XMLOutputter.output(Element element,
java.io.OutputStream out)
|
void |
XMLOutputter.output(Element element,
java.io.Writer out)
|
void |
StAXEventOutputter.output(Element element,
javax.xml.stream.util.XMLEventConsumer out)
|
void |
StAXStreamOutputter.output(Element element,
javax.xml.stream.XMLStreamWriter out)
|
void |
XMLOutputter.outputElementContent(Element element,
java.io.OutputStream out)
This will handle printing out an
's content only, not including its tag, and attributes. |
void |
XMLOutputter.outputElementContent(Element element,
java.io.Writer out)
This will handle printing out an
's content only, not including its tag, and attributes. |
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. |
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. |
java.lang.String |
XMLOutputter.outputElementContentString(Element element)
This will handle printing out an
's content only, not including its tag, and attributes. |
java.lang.String |
XMLOutputter.outputString(Element element)
Return a string representing an
Element . |
Modifier and Type | Method and Description |
---|---|
protected org.w3c.dom.Element |
AbstractDOMOutputProcessor.printElement(FormatStack fstack,
NamespaceStack nstack,
org.w3c.dom.Document basedoc,
Element element)
This will handle printing of an
Element . |
protected void |
AbstractSAXOutputProcessor.printElement(SAXTarget out,
FormatStack fstack,
NamespaceStack nstack,
Element element)
This will handle printing of an
Element . |
protected void |
AbstractXMLOutputProcessor.printElement(java.io.Writer out,
FormatStack fstack,
NamespaceStack nstack,
Element element)
This will handle printing of an
Element . |
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 an
Element . |
protected void |
AbstractStAXStreamProcessor.printElement(javax.xml.stream.XMLStreamWriter out,
FormatStack fstack,
NamespaceStack nstack,
Element element)
This will handle printing of an
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. |
org.w3c.dom.Element |
AbstractDOMOutputProcessor.process(org.w3c.dom.Document basedoc,
Format format,
Element element) |
void |
SAXOutputProcessor.process(SAXTarget out,
Format format,
Element element)
|
void |
AbstractSAXOutputProcessor.process(SAXTarget out,
Format format,
Element element) |
void |
XMLOutputProcessor.process(java.io.Writer out,
Format format,
Element element)
|
void |
AbstractXMLOutputProcessor.process(java.io.Writer out,
Format format,
Element element) |
void |
AbstractStAXEventProcessor.process(javax.xml.stream.util.XMLEventConsumer out,
Format format,
javax.xml.stream.XMLEventFactory eventfactory,
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 |
AbstractStAXStreamProcessor.process(javax.xml.stream.XMLStreamWriter out,
Format format,
Element element) |
void |
SAXOutputProcessor.processAsDocument(SAXTarget out,
Format format,
Element element)
|
void |
AbstractSAXOutputProcessor.processAsDocument(SAXTarget out,
Format format,
Element node) |
Constructor and Description |
---|
JDOMSource(Element source)
Creates a JDOM TrAX source wrapping a JDOM element.
|
Modifier and Type | Method and Description |
---|---|
void |
NamespaceStack.push(Element element)
Create a new in-scope level for the Stack based on an Element.
|
Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.