| 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.stax |
Support classes for building JDOM documents and content using StAX readers.
|
| org.jdom2.located |
Extended JDOM Content Classes that contain location coordinates.
|
| 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.util |
Classes that implement useful functionality, but are not easy to categorise.
|
| org.jdom2.xpath |
Support for XPath from within JDOM.
|
| org.jdom2.xpath.jaxen |
Support for the Jaxen XPath Library.
|
| org.jdom2.xpath.util |
Classes useful for interfacing the JDOM XPath API to full XPath libraries.
|
| Modifier and Type | Field | Description |
|---|---|---|
protected Namespace |
Attribute.namespace |
The
of the Attribute |
protected Namespace |
Element.namespace |
The namespace of the element
|
static Namespace |
Namespace.NO_NAMESPACE |
Define a
Namespace for when not in a namespace |
static Namespace |
Namespace.XML_NAMESPACE |
Define a
Namespace for the standard xml prefix. |
| Modifier and Type | Method | Description |
|---|---|---|
Namespace |
Attribute.getNamespace() |
This will return this
Attribute's
. |
Namespace |
Element.getNamespace() |
Returns the element's
Namespace. |
Namespace |
Element.getNamespace(java.lang.String prefix) |
Returns the
Namespace corresponding to the given prefix in scope
for this element. |
static Namespace |
Namespace.getNamespace(java.lang.String uri) |
This will retrieve (if in existence) or create (if not) a
Namespace for the supplied URI, and make it usable
as a default namespace, as no prefix is supplied. |
static Namespace |
Namespace.getNamespace(java.lang.String prefix,
java.lang.String uri) |
This will retrieve (if in existence) or create (if not) a
Namespace for the supplied prefix and uri. |
| Modifier and Type | Method | Description |
|---|---|---|
java.util.List<Namespace> |
Element.getAdditionalNamespaces() |
Returns a list of the additional namespace declarations on this element.
|
java.util.List<Namespace> |
Attribute.getNamespacesInherited() |
|
java.util.List<Namespace> |
Content.getNamespacesInherited() |
|
java.util.List<Namespace> |
Document.getNamespacesInherited() |
|
java.util.List<Namespace> |
Element.getNamespacesInherited() |
|
java.util.List<Namespace> |
NamespaceAware.getNamespacesInherited() |
Obtain a list of all namespaces that are in scope for this content, but
were not introduced by this content.
|
java.util.List<Namespace> |
Attribute.getNamespacesInScope() |
Get the namespaces that are in-scope on this Attribute.
|
java.util.List<Namespace> |
Content.getNamespacesInScope() |
|
java.util.List<Namespace> |
Document.getNamespacesInScope() |
Get the Namespaces that are in-scope on this Document.
|
java.util.List<Namespace> |
Element.getNamespacesInScope() |
Get the Namespaces that are in-scope on this Element.
|
java.util.List<Namespace> |
NamespaceAware.getNamespacesInScope() |
Obtain a list of all namespaces that are in scope for the current
content.
|
java.util.List<Namespace> |
Attribute.getNamespacesIntroduced() |
|
java.util.List<Namespace> |
Content.getNamespacesIntroduced() |
|
java.util.List<Namespace> |
Document.getNamespacesIntroduced() |
|
java.util.List<Namespace> |
Element.getNamespacesIntroduced() |
|
java.util.List<Namespace> |
NamespaceAware.getNamespacesIntroduced() |
Obtain a list of all namespaces that are introduced to the XML tree by
this node.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
DefaultJDOMFactory.addNamespaceDeclaration(Element parent,
Namespace additional) |
|
boolean |
Element.addNamespaceDeclaration(Namespace additionalNamespace) |
Adds a namespace declarations to this element.
|
void |
JDOMFactory.addNamespaceDeclaration(Element element,
Namespace additional) |
Adds a namespace declaration to an Element
|
void |
UncheckedJDOMFactory.addNamespaceDeclaration(Element parent,
Namespace additional) |
|
Attribute |
DefaultJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace) |
Deprecated.
|
Attribute |
DefaultJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
|
Attribute |
DefaultJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
|
Attribute |
JDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace) |
Deprecated.
|
Attribute |
JDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
This will create a new
Attribute with the
specified (local) name, value, and type, and in the provided
. |
Attribute |
JDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
This will create a new
Attribute with the
specified (local) name and value, and in the provided
. |
Attribute |
SlimJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace) |
Deprecated.
|
Attribute |
SlimJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
|
Attribute |
SlimJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
|
Attribute |
UncheckedJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace) |
Deprecated.
|
Attribute |
UncheckedJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
|
Attribute |
UncheckedJDOMFactory.attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
|
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
java.util.List<?> list) |
Check if a
collides with any namespace
from a list of objects. |
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
java.util.List<?> list,
int ignoreatt) |
Check if a
collides with any namespace
from a list of objects. |
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Attribute attribute) |
|
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Element element) |
|
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Element element,
int ignoreatt) |
|
static java.lang.String |
Verifier.checkNamespaceCollision(Namespace namespace,
Namespace other) |
Check if two namespaces collide.
|
Element |
DefaultJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
|
Element |
DefaultJDOMFactory.element(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 |
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 |
SlimJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
|
Element |
UncheckedJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
|
Attribute |
Element.getAttribute(java.lang.String attname,
Namespace ns) |
This returns the attribute for this element with the given name
and within the given Namespace, or null if no such attribute exists.
|
java.lang.String |
Element.getAttributeValue(java.lang.String attname,
Namespace ns) |
This returns the attribute value for the attribute with the given name
and within the given Namespace, null if there is no such attribute, and
the empty string if the attribute value is empty.
|
java.lang.String |
Element.getAttributeValue(java.lang.String attname,
Namespace ns,
java.lang.String def) |
This returns the attribute value for the attribute with the given name
and within the given Namespace, or the passed-in default if there is no
such attribute.
|
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.
|
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. |
java.lang.String |
Element.getChildText(java.lang.String cname,
Namespace ns) |
Returns the textual content of the named child element, or null if
there's no such child.
|
java.lang.String |
Element.getChildTextNormalize(java.lang.String cname,
Namespace ns) |
Returns the normalized textual content of the named child element, or
null if there's no such child.
|
java.lang.String |
Element.getChildTextTrim(java.lang.String cname,
Namespace ns) |
Returns the trimmed textual content of the named child element, or null
if there's no such child.
|
boolean |
Element.removeAttribute(java.lang.String attname,
Namespace ns) |
This removes the attribute with the given name and within the
given Namespace.
|
boolean |
Element.removeChild(java.lang.String cname,
Namespace ns) |
This removes the first child element (one level deep) with the
given local name and belonging to the given namespace.
|
boolean |
Element.removeChildren(java.lang.String cname,
Namespace ns) |
This removes all child elements (one level deep) with the
given local name and belonging to the given namespace.
|
void |
Element.removeNamespaceDeclaration(Namespace additionalNamespace) |
Removes an additional namespace declarations from this element.
|
Element |
Element.setAttribute(java.lang.String name,
java.lang.String value,
Namespace ns) |
This sets an attribute value for this element.
|
Attribute |
Attribute.setNamespace(Namespace namespace) |
This sets this
Attribute's . |
Element |
Element.setNamespace(Namespace namespace) |
Sets the element's
Namespace. |
| Constructor | Description |
|---|---|
Attribute(java.lang.String name,
java.lang.String value,
int type,
Namespace namespace) |
Deprecated.
|
Attribute(java.lang.String name,
java.lang.String value,
AttributeType type,
Namespace namespace) |
This will create a new
Attribute with the
specified (local) name, value, and type, and in the provided
. |
Attribute(java.lang.String name,
java.lang.String value,
Namespace namespace) |
This will create a new
Attribute with the
specified (local) name and value, and in the provided
. |
Element(java.lang.String name,
Namespace namespace) |
Creates a new element with the supplied (local) name and namespace.
|
| Modifier and Type | Method | Description |
|---|---|---|
static Filter<Attribute> |
Filters.attribute(java.lang.String name,
Namespace ns) |
Return a Filter that matches any
Attribute data with the
specified name and namespace. |
static Filter<Attribute> |
Filters.attribute(Namespace ns) |
Return a Filter that matches any
Attribute data with the
specified namespace. |
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. |
static Filter<Element> |
Filters.element(Namespace ns) |
Return a Filter that matches any
Element data with the specified
Namespace. |
| Constructor | Description |
|---|---|
AttributeFilter(java.lang.String name,
Namespace namespace) |
Select only the Attributes with the supplied name and Namespace.
|
AttributeFilter(Namespace namespace) |
Select only the Attributes with the supplied Namespace.
|
ElementFilter(java.lang.String name,
Namespace namespace) |
Select only the Elements with the supplied name and Namespace.
|
ElementFilter(Namespace namespace) |
Select only the Elements with the supplied Namespace.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
DefaultStAXFilter.includeElement(int depth,
java.lang.String name,
Namespace ns) |
|
boolean |
StAXFilter.includeElement(int depth,
java.lang.String name,
Namespace ns) |
The current event is an Element event.
|
boolean |
DefaultStAXFilter.pruneElement(int depth,
java.lang.String name,
Namespace ns) |
|
boolean |
StAXFilter.pruneElement(int depth,
java.lang.String name,
Namespace ns) |
An Element is being included, and this is a child Element event of the
included parent Element.
|
| Modifier and Type | Method | Description |
|---|---|---|
Element |
LocatedJDOMFactory.element(int line,
int col,
java.lang.String name,
Namespace namespace) |
| Constructor | Description |
|---|---|
LocatedElement(java.lang.String name,
Namespace namespace) |
Creates a new element with the supplied (local) name and namespace.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
AbstractStAXStreamProcessor.printNamespace(javax.xml.stream.XMLStreamWriter out,
FormatStack fstack,
Namespace ns) |
This will handle printing of any needed
declarations. |
protected void |
AbstractXMLOutputProcessor.printNamespace(java.io.Writer out,
FormatStack fstack,
Namespace ns) |
This will handle printing of any needed
declarations. |
| Modifier and Type | Method | Description |
|---|---|---|
Namespace[] |
NamespaceStack.getScope() |
Return a new array instance representing the current scope.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Iterable<Namespace> |
NamespaceStack.addedForward() |
Return an Iterable containing all the Namespaces introduced to the
current-level's scope.
|
java.lang.Iterable<Namespace> |
NamespaceStack.addedReverse() |
Return an Iterable containing all the Namespaces introduced to the
current-level's scope but in reverse order to
NamespaceStack.addedForward(). |
java.util.Iterator<Namespace> |
NamespaceStack.iterator() |
Get all the Namespaces in-scope at the current level of the stack.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
NamespaceStack.isInScope(Namespace ns) |
Inspect the current scope and return true if the specified namespace is
in scope.
|
| Constructor | Description |
|---|---|
NamespaceStack(Namespace[] seed) |
Create a NamespaceWalker ready to use as a stack.
|
| Modifier and Type | Method | Description |
|---|---|---|
Namespace |
XPathBuilder.getNamespace(java.lang.String prefix) |
Get the Namespace associated with the given prefix.
|
Namespace |
XPathExpression.getNamespace(java.lang.String prefix) |
Get the Namespace associated with a given prefix.
|
Namespace[] |
XPathExpression.getNamespaces() |
Get the Namespaces that were used to compile this XPathExpression.
|
| Modifier and Type | Method | Description |
|---|---|---|
abstract void |
XPath.addNamespace(Namespace namespace) |
Deprecated.
Adds a namespace definition to the list of namespaces known of
this XPath expression.
|
abstract <T> XPathExpression<T> |
XPathFactory.compile(java.lang.String expression,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
Namespace... namespaces) |
Create a Compiled XPathExpression<> instance from this factory.
|
java.lang.Object |
XPathExpression.getVariable(java.lang.String localname,
Namespace uri) |
Get the variable value associated to the given variable name.
|
boolean |
XPathBuilder.setNamespace(Namespace namespace) |
Define a Namespace to be available for the XPath expression.
|
java.lang.Object |
XPathExpression.setVariable(java.lang.String localname,
Namespace uri,
java.lang.Object value) |
Change the defined value for a variable to some new value.
|
| Modifier and Type | Method | Description |
|---|---|---|
<T> XPathExpression<T> |
XPathFactory.compile(java.lang.String expression,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
java.util.Collection<Namespace> namespaces) |
Create a XPathExpression<> instance from this factory.
|
boolean |
XPathBuilder.setNamespaces(java.util.Collection<Namespace> namespaces) |
Add a number of namespaces to this XPathBuilder
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
JDOMXPath.addNamespace(Namespace namespace) |
Deprecated.
Adds a namespace definition to the list of namespaces known of this XPath
expression.
|
<T> XPathExpression<T> |
JaxenXPathFactory.compile(java.lang.String expression,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
Namespace... namespaces) |
| Modifier and Type | Method | Description |
|---|---|---|
Namespace |
AbstractXPathCompiled.getNamespace(java.lang.String prefix) |
|
Namespace[] |
AbstractXPathCompiled.getNamespaces() |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.Object |
AbstractXPathCompiled.getVariable(java.lang.String name,
Namespace uri) |
|
java.lang.Object |
AbstractXPathCompiled.setVariable(java.lang.String name,
Namespace uri,
java.lang.Object value) |
| Constructor | Description |
|---|---|
AbstractXPathCompiled(java.lang.String query,
Filter<T> filter,
java.util.Map<java.lang.String,java.lang.Object> variables,
Namespace[] namespaces) |
Construct an XPathExpression.
|
Copyright ? 2019 Jason Hunter, Brett McLaughlin. All Rights Reserved.