| 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.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 | Method | Description |
|---|---|---|
<F extends Content> |
Document.getContent(Filter<F> filter) |
Return a filtered view of this
Document's content. |
<E extends Content> |
Element.getContent(Filter<E> filter) |
Return a filter view of this
Element's content. |
<E extends Content> |
Parent.getContent(Filter<E> filter) |
Returns as a
List the content of
this parent that matches the supplied filter. |
<F extends Content> |
Document.getDescendants(Filter<F> filter) |
Returns an iterator that walks over all descendants in document order
applying the Filter to return only elements that match the filter rule.
|
<F extends Content> |
Element.getDescendants(Filter<F> filter) |
Returns an iterator that walks over all descendants in document order
applying the Filter to return only content that match the filter rule.
|
<E extends Content> |
Parent.getDescendants(Filter<E> filter) |
Returns an
Iterator that walks over all descendants
in document order applying the Filter to return only content that
match the filter rule. |
<F extends Content> |
Document.removeContent(Filter<F> filter) |
Remove all child content from this parent matching the supplied filter.
|
<F extends Content> |
Element.removeContent(Filter<F> filter) |
Remove all child content from this parent matching the supplied filter.
|
<E extends Content> |
Parent.removeContent(Filter<E> filter) |
Removes from this parent all child content matching the given filter
and returns a list of the detached children.
|
<E extends Content> |
Element.sortContent(Filter<E> filter,
java.util.Comparator<? super E> comparator) |
Sort the child content of this Element that matches the Filter, using a
mechanism that is safe for JDOM content.
|
| Modifier and Type | Class | Description |
|---|---|---|
class |
AbstractFilter<T> |
Partial implementation of
Filter. |
class |
AttributeFilter |
A Filter that only matches
Attribute objects. |
class |
ContentFilter |
A general purpose Filter able to represent all legal JDOM objects or a
specific subset.
|
class |
ElementFilter |
A Filter that only matches
Element objects. |
| Modifier and Type | Method | Description |
|---|---|---|
Filter<T> |
AbstractFilter.and(Filter<?> filter) |
|
Filter<T> |
Filter.and(Filter<?> filter) |
Creates an ANDing filter.
|
static Filter<Attribute> |
Filters.attribute() |
Return a Filter that matches any
Attribute data. |
static Filter<Attribute> |
Filters.attribute(java.lang.String name) |
Return a Filter that matches any
Attribute data with the
specified name. |
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<CDATA> |
Filters.cdata() |
Return a Filter that matches any
CDATA data. |
static Filter<Comment> |
Filters.comment() |
Return a Filter that matches any
Comment data. |
static Filter<Content> |
Filters.content() |
Return a Filter that matches any
Content data. |
static Filter<DocType> |
Filters.doctype() |
Return a Filter that matches any
DocType data. |
static Filter<Document> |
Filters.document() |
Return a Filter that matches any
Document data. |
static Filter<Element> |
Filters.element() |
Return a Filter that matches any
Element data. |
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. |
static Filter<Element> |
Filters.element(Namespace ns) |
Return a Filter that matches any
Element data with the specified
Namespace. |
static Filter<EntityRef> |
Filters.entityref() |
Return a Filter that matches any
EntityRef data. |
static Filter<java.lang.Boolean> |
Filters.fboolean() |
Return a Filter that matches any Boolean data.
|
static <F> Filter<F> |
Filters.fclass(java.lang.Class<F> clazz) |
Return a Filter that matches any data of the specified Class.
|
static Filter<java.lang.Double> |
Filters.fdouble() |
Return a Filter that matches any Double data.
|
static Filter<java.lang.Object> |
Filters.fpassthrough() |
Return a filter that does no filtering at all - everything matches.
|
static Filter<java.lang.String> |
Filters.fstring() |
Return a Filter that matches any String data.
|
Filter<?> |
AbstractFilter.negate() |
|
Filter<? extends java.lang.Object> |
Filter.negate() |
Creates an 'inverse' filter
|
Filter<? extends Content> |
AbstractFilter.or(Filter<?> filter) |
|
Filter<? extends java.lang.Object> |
Filter.or(Filter<?> filter) |
Creates an ORing filter
|
static Filter<ProcessingInstruction> |
Filters.processinginstruction() |
Return a Filter that matches any
ProcessingInstruction data. |
<R> Filter<R> |
AbstractFilter.refine(Filter<R> filter) |
|
<R> Filter<R> |
Filter.refine(Filter<R> filter) |
This is similar to the and(Filter) method except the generic type is
different.
|
static Filter<Text> |
Filters.text() |
|
static Filter<Text> |
Filters.textOnly() |
| Modifier and Type | Method | Description |
|---|---|---|
Filter<T> |
AbstractFilter.and(Filter<?> filter) |
|
Filter<T> |
Filter.and(Filter<?> filter) |
Creates an ANDing filter.
|
Filter<? extends Content> |
AbstractFilter.or(Filter<?> filter) |
|
Filter<? extends java.lang.Object> |
Filter.or(Filter<?> filter) |
Creates an ORing filter
|
<R> Filter<R> |
AbstractFilter.refine(Filter<R> filter) |
|
<R> Filter<R> |
Filter.refine(Filter<R> filter) |
This is similar to the and(Filter) method except the generic type is
different.
|
| Modifier and Type | Method | Description |
|---|---|---|
Filter<T> |
XPathBuilder.getFilter() |
Get the Filter instance used for coercion.
|
Filter<T> |
XPathExpression.getFilter() |
Get the
Filter<T> used to coerce the raw XPath results in to
the correct Generic type. |
| Modifier and Type | Method | Description |
|---|---|---|
<T> XPathExpression<T> |
XPathFactory.compile(java.lang.String expression,
Filter<T> filter) |
Create a XPathExpression<T> instance from this factory.
|
<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.
|
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.
|
| Constructor | Description |
|---|---|
XPathBuilder(java.lang.String expression,
Filter<T> filter) |
Create a skeleton XPathBuilder with the given expression and result
filter.
|
| Modifier and Type | Method | Description |
|---|---|---|
<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 |
|---|---|---|
Filter<T> |
AbstractXPathCompiled.getFilter() |
| 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.