Package | Description |
---|---|
org.joox |
Modifier and Type | Method and Description |
---|---|
static Match |
JOOX.$()
Wrap a new empty document
|
static Match |
JOOX.$(Context context)
Convenience method for calling
$(context.element()) |
static Match |
JOOX.$(Document document)
Wrap a DOM document in a jOOX
Match element set |
static Match |
JOOX.$(Element element)
Wrap a DOM element in a jOOX
Match element set |
static Match |
JOOX.$(File file)
Read a DOM document from a file into a
Match element set |
static Match |
JOOX.$(InputSource source)
Read a DOM document from a file into a
Match element set |
static Match |
JOOX.$(InputStream stream)
Read a DOM document from a stream into a
Match element set |
static Match |
JOOX.$(Match match)
Convenience method for calling
$(match) |
static Match |
JOOX.$(Node node)
Wrap a DOM
Node in a jOOX Match element set
Supported node types are
Document : see JOOX.$(Document)
Element : see JOOX.$(Element)
If the supplied Node is of any other type, then an empty Match is created |
static Match |
JOOX.$(NodeList list)
|
static Match |
JOOX.$(Object object)
Wrap a JAXB-marshallable element in a jOOX
Match element set |
static Match |
JOOX.$(Reader reader)
Read a DOM document from a reader into a
Match element set |
static Match |
JOOX.$(String name)
Create a new DOM element in an independent document
|
static Match |
JOOX.$(String name,
Element... content)
Create a new DOM element in an independent document
The added content is cloned into the new document
|
static Match |
JOOX.$(String name,
Match... content)
Create a new DOM element in an independent document
The added content is cloned into the new document
|
static Match |
JOOX.$(String name,
String content)
Create a new DOM element in an independent document
|
static Match |
JOOX.$(URI uri)
Convenience method for calling
$(new File(uri)) |
static Match |
JOOX.$(URL url)
Convenience method for calling
$(url.openStream()) |
Match |
Match.add(Element... elements)
Add some elements to the set of matched elements
|
Match |
Match.add(Match... elements)
Add some elements to the set of matched elements
|
Match |
Match.after(Content content)
Add content after each element in the set of matched elements.
|
Match |
Match.after(Element... content)
Add content after each element in the set of matched elements.
|
Match |
Match.after(Match... content)
Add content after each element in the set of matched elements.
|
Match |
Match.after(String content)
Add content after each element in the set of matched elements.
|
Match |
Match.andSelf()
Add the previous set of matched elements to the current one.
|
Match |
Match.append(Content content)
Append content to the end of each element's content in the set of matched
elements.
|
Match |
Match.append(Element... content)
Append content to the end of each element's content in the set of matched
elements.
|
Match |
Match.append(Match... content)
Append content to the end of each element's content in the set of matched
elements.
|
Match |
Match.append(String content)
Append content to the end of each element's content in the set of matched
elements.
|
Match |
Match.attr(String name,
Content value)
Set an attribute on all elements in the set of matched elements.
|
Match |
Match.attr(String name,
String value)
Set an attribute on all elements in the set of matched elements.
|
Match |
Match.before(Content content)
Add content before each element in the set of matched elements.
|
Match |
Match.before(Element... content)
Add content before each element in the set of matched elements.
|
Match |
Match.before(Match... content)
Add content before each element in the set of matched elements.
|
Match |
Match.before(String content)
Add content before each element in the set of matched elements.
|
Match |
Match.child()
Find the first child of each element in the current set of matched
elements.
|
Match |
Match.child(Filter filter)
Find the first matching child of each element in the current set of
matched elements
|
Match |
Match.child(int index)
Find the child at a given index of each element in the current set of
matched elements.
|
Match |
Match.child(String selector)
Find the first matching child of each element in the current set of
matched elements
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.children()
Find all children of each element in the current set of matched elements.
|
Match |
Match.children(Filter filter)
Find all children of each element in the current set of matched elements.
|
Match |
Match.children(int... indexes)
Find all children of each element at given indexes in the current set of
matched elements.
|
Match |
Match.children(String selector)
Find all children of each element in the current set of matched elements.
|
Match |
Match.content(Content content)
Add some XML content to all elements in the set of matched elements
(possibly replacing existing content).
|
Match |
Match.content(Object content)
Add some JAXB-marshallable XML content to all elements in the set of
matched elements (possibly replacing existing content).
|
Match |
Match.content(String content)
Add some XML content to all elements in the set of matched elements
(possibly replacing existing content).
|
Match |
Match.copy()
Get a copy of the
Match wrapper. |
Match |
Match.each(Each... each)
Execute several callbacks for every element in the current set of matched
elements.
|
Match |
Match.each(Each each)
Execute a callback for every element in the current set of matched
elements.
|
Match |
Match.each(Iterable<? extends Each> each)
Execute several callbacks for every element in the current set of matched
elements.
|
Match |
Match.empty()
Removes all content from all elements in the set of matched elements.
|
Match |
Match.eq(int... indexes)
Reduce the current set of matched elements to the elements at the given
indexes.
|
Match |
Match.filter(Filter filter)
Reduce the current set of matched elements.
|
Match |
Match.filter(String selector)
Reduce the current set of matched elements.
|
Match |
Match.find()
Find all descendants of each element in the current set of matched
elements.
|
Match |
Match.find(Filter filter)
Find all descendants of each element in the current set of matched
elements.
|
Match |
Match.find(String selector)
Find all descendants of each element in the current set of matched
elements.
|
Match |
Match.first()
Get the first in a set of matched elements.
|
Match |
Match.has(Filter filter)
Reduce the set of matched element to those who have a descendant that
matches a filter.
|
Match |
Match.has(String selector)
Reduce the set of matched element to those who have a descendant that
matches a selector.
|
Match |
Match.last()
Get the last in a set of matched elements.
|
Match |
Match.leaf()
Reduce the set of matched elements to the ones that are leaf elements
|
Match |
Match.matchAttr(String name,
String valueRegex)
Reduce the set of matched elements by filtering out those whose attribute
content doesn't match a given regex
This is the same as calling
matchAttr(name, valueRegex, true) |
Match |
Match.matchAttr(String name,
String valueRegex,
boolean keepMatches)
Reduce the set of matched elements by filtering out those whose attribute
content doesn't match a given regex
(keepMatches = true) , or
those whose text content matches a given regex
(keepMatches = false) |
Match |
Match.matchTag(String regex)
Reduce the set of matched elements by filtering out those whose tag name
doesn't match a given regex
This is the same as calling
matchText(regex, true) |
Match |
Match.matchTag(String regex,
boolean keepMatches)
Reduce the set of matched elements by filtering out those whose tag name
doesn't match a given regex
(keepMatches = true) , or those
whose tag name matches a given regex (keepMatches = false) |
Match |
Match.matchText(String regex)
Reduce the set of matched elements by filtering out those whose text
content doesn't match a given regex
This is the same as calling
matchText(regex, true) |
Match |
Match.matchText(String regex,
boolean keepMatches)
Reduce the set of matched elements by filtering out those whose text
content doesn't match a given regex
(keepMatches = true) , or
those whose text content matches a given regex
(keepMatches = false) |
Match |
Match.namespace(String namespacePrefix,
String namespaceURI)
Get a new Match with added namespace configuration for subsequent XPath
calls
This is a convenience method for
namespace(String, String) |
Match |
Match.namespaces(Map<String,String> map)
Get a new Match with added namespace configuration for subsequent XPath
calls
|
Match |
Match.next()
Get the immediate next sibling of every element in set of matched
elements.
|
Match |
Match.next(Filter filter)
Get the immediate next sibling of every element in set of matched
elements, matching a filter
The callback
Context is populated like this:
Context.match() - the matched element whose next sibling is
searched
Context.matchIndex() - the index of the matched element whose
next sibling is searched
Context.element() - the next sibling that is being filtered
Context.elementIndex() - 1
|
Match |
Match.next(String selector)
Get the immediate next sibling of every element in set of matched
elements, matching a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.nextAll()
Get all next siblings of every element in a set of matched elements
|
Match |
Match.nextAll(Filter filter)
Get all next siblings of every element in a set of matched elements,
matching a filter
The callback
Context is populated like this:
Context.match() - the matched element whose next siblings are
searched
Context.matchIndex() - the index of the matched element whose
next siblings are searched
Context.element() - the next siblings that is being filtered
Context.elementIndex() - the relative index of the next
siblings that are being filtered
|
Match |
Match.nextAll(String selector)
Get all next siblings of every element in a set of matched elements,
matching a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.nextUntil(Filter until)
Get all next siblings of every element in a set of matched elements until
the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose next siblings are
searched
Context.matchIndex() - the index of the matched element whose
next siblings are searched
Context.element() - the next siblings that is being filtered
Context.elementIndex() - the relative index of the next
siblings that are being filtered
|
Match |
Match.nextUntil(Filter until,
Filter filter)
Get all next siblings of every element in a set of matched elements,
matching a filter until the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose next siblings are
searched
Context.matchIndex() - the index of the matched element whose
next siblings are searched
Context.element() - the next siblings that is being filtered
Context.elementIndex() - the relative index of the next
siblings that are being filtered
|
Match |
Match.nextUntil(Filter until,
String selector)
Get all next siblings of every element in a set of matched elements,
matching a selector until the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose next siblings are
searched
Context.matchIndex() - the index of the matched element whose
next siblings are searched
Context.element() - the next siblings that is being filtered
Context.elementIndex() - the relative index of the next
siblings that are being filtered
|
Match |
Match.nextUntil(String until)
Get all next siblings of every element in a set of matched elements until
the provided selector matches
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.nextUntil(String until,
Filter filter)
Get all next siblings of every element in a set of matched elements,
matching a filter, until the provided selector matches
The callback
Context is populated like this:
Context.match() - the matched element whose next siblings are
searched
Context.matchIndex() - the index of the matched element whose
next siblings are searched
Context.element() - the next siblings that is being filtered
Context.elementIndex() - the relative index of the next
siblings that are being filtered
|
Match |
Match.nextUntil(String until,
String selector)
Get all next siblings of every element in a set of matched elements,
matching a selector, until the provided selector matches
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.not(Filter filter)
Remove elements from the set of matched elements.
|
Match |
Match.not(String selector)
Remove elements from the set of matched elements.
|
Match |
Match.parent()
Get the immediate parent elements of every element in a set of matched
elements
|
Match |
Match.parent(Filter filter)
Get the immediate parent elements of every element in a set of matched
elements, matching a filter
The callback
Context is populated like this:
Context.match() - the matched element whose parent is
searched
Context.matchIndex() - the index of the matched element whose
parent is searched
Context.element() - the parent that is being filtered
Context.elementIndex() - 1
|
Match |
Match.parent(String selector)
Get the immediate parent elements of every element in a set of matched
elements, matching a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.parents()
Get all ancestor elements of every element in a set of matched elements
|
Match |
Match.parents(Filter filter)
Get all ancestor elements of every element in a set of matched elements,
matching a filter
The callback
Context is populated like this:
Context.match() - the matched element whose parents are
searched
Context.matchIndex() - the index of the matched element whose
parents are searched
Context.element() - the parent that is being filtered
Context.elementIndex() - the relative index of the parent
that is being filtered
|
Match |
Match.parents(String selector)
Get all ancestor elements of every element in a set of matched elements,
matching a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.parentsUntil(Filter until)
Get all ancestors of every element in a set of matched elements until the
provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose parents are
searched
Context.matchIndex() - the index of the matched element whose
parents are searched
Context.element() - the parent that is being filtered
Context.elementIndex() - the relative index of the parent
that is being filtered
|
Match |
Match.parentsUntil(Filter until,
Filter filter)
Get all ancestors of every element in a set of matched elements, matching
a filter until the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose parents are
searched
Context.matchIndex() - the index of the matched element whose
parents are searched
Context.element() - the parent that is being filtered
Context.elementIndex() - the relative index of the parent
that is being filtered
|
Match |
Match.parentsUntil(Filter until,
String selector)
Get all ancestors of every element in a set of matched elements, matching
a selector until the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose parents are
searched
Context.matchIndex() - the index of the matched element whose
parents are searched
Context.element() - the parent that is being filtered
Context.elementIndex() - the relative index of the parent
that is being filtered
|
Match |
Match.parentsUntil(String until)
Get all ancestors of every element in a set of matched elements until the
provided selector matches
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.parentsUntil(String until,
Filter filter)
Get all ancestors of every element in a set of matched elements, matching
a filter, until the provided selector matches
The callback
Context is populated like this:
Context.match() - the matched element whose parents are
searched
Context.matchIndex() - the index of the matched element whose
parents are searched
Context.element() - the parent that is being filtered
Context.elementIndex() - the relative index of the parent
that is being filtered
|
Match |
Match.parentsUntil(String until,
String selector)
Get all ancestors of every element in a set of matched elements, matching
a selector, until the provided selector matches
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.prepend(Content content)
Prepend content to the beginning of each element's content in the set of
matched elements.
|
Match |
Match.prepend(Element... content)
Prepend content to the beginning of each element's content in the set of
matched elements.
|
Match |
Match.prepend(Match... content)
Prepend content to the beginning of each element's content in the set of
matched elements.
|
Match |
Match.prepend(String content)
Prepend content to the beginning of each element's content in the set of
matched elements.
|
Match |
Match.prev()
Get the immediate previous sibling of every element in set of matched
elements.
|
Match |
Match.prev(Filter filter)
Get the immediate previous sibling of every element in set of matched
elements, matching a filter
The callback
Context is populated like this:
Context.match() - the matched element whose previous sibling
is searched
Context.matchIndex() - the index of the matched element whose
previous sibling is searched
Context.element() - the previous sibling that is being
filtered
Context.elementIndex() - 1
|
Match |
Match.prev(String selector)
Get the immediate previous sibling of every element in set of matched
elements, matching a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.prevAll()
Get all previous siblings of every element in a set of matched elements
|
Match |
Match.prevAll(Filter filter)
Get all previous siblings of every element in a set of matched elements,
matching a filter
The callback
Context is populated like this:
Context.match() - the matched element whose previous siblings
are searched
Context.matchIndex() - the index of the matched element whose
previous siblings are searched
Context.element() - the previous siblings that is being
filtered
Context.elementIndex() - the relative index of the previous
siblings that are being filtered
|
Match |
Match.prevAll(String selector)
Get all previous siblings of every element in a set of matched elements,
matching a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.prevUntil(Filter until)
Get all previous siblings of every element in a set of matched elements
until the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose previous siblings
are searched
Context.matchIndex() - the index of the matched element whose
previous siblings are searched
Context.element() - the previous siblings that is being
filtered
Context.elementIndex() - the relative index of the previous
siblings that are being filtered
|
Match |
Match.prevUntil(Filter until,
Filter filter)
Get all previous siblings of every element in a set of matched elements,
matching a filter until the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose previous siblings
are searched
Context.matchIndex() - the index of the matched element whose
previous siblings are searched
Context.element() - the previous siblings that is being
filtered
Context.elementIndex() - the relative index of the previous
siblings that are being filtered
|
Match |
Match.prevUntil(Filter until,
String selector)
Get all previous siblings of every element in a set of matched elements,
matching a selector until the provided filter matches
The callback
Context is populated like this:
Context.match() - the matched element whose previous siblings
are searched
Context.matchIndex() - the index of the matched element whose
previous siblings are searched
Context.element() - the previous siblings that is being
filtered
Context.elementIndex() - the relative index of the previous
siblings that are being filtered
|
Match |
Match.prevUntil(String until)
Get all previous siblings of every element in a set of matched elements
until the provided selector matches
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.prevUntil(String until,
Filter filter)
Get all previous siblings of every element in a set of matched elements,
matching a filter, until the provided selector matches
The callback
Context is populated like this:
Context.match() - the matched element whose previous siblings
are searched
Context.matchIndex() - the index of the matched element whose
previous siblings are searched
Context.element() - the previous siblings that is being
filtered
Context.elementIndex() - the relative index of the previous
siblings that are being filtered
|
Match |
Match.prevUntil(String until,
String selector)
Get all previous siblings of every element in a set of matched elements,
matching a selector, until the provided selector matches
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.remove()
Removes all elements from their parent nodes in the set of matched
elements.
|
Match |
Match.remove(Filter filter)
Removes all elements from their parent nodes in the set of matched
elements, matching a filter
The callback
Context is populated like this:
Context.match() - the matched element being removed
Context.matchIndex() - the index of the matched element being
removed
|
Match |
Match.remove(String selector)
Removes all elements from their parent nodes in the set of matched
elements, matching a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.removeAttr(String name)
Remove an attribute from all elements in the set of matched elements.
|
Match |
Match.rename(Content tag)
Rename all tags in the set of matched elements to some new tag name
|
Match |
Match.rename(String tag)
Rename all tags in the set of matched elements to some new tag name
|
Match |
Match.replaceWith(Content content)
Replace all elements in the set of matched elements with some new
content.
|
Match |
Match.replaceWith(Element... content)
Replace all elements in the set of matched elements with some new
content.
|
Match |
Match.replaceWith(Match... content)
Replace all elements in the set of matched elements with some new
content.
|
Match |
Match.replaceWith(String content)
Replace all elements in the set of matched elements with some new
content.
|
Match |
Match.reverse()
Reverse the order of the set of matched elements
|
Match |
Match.siblings()
Get all siblings of every element in a set of matched elements
|
Match |
Match.siblings(Filter filter)
Get all siblings of every element in a set of matched elements, matching
a filter
The callback
Context is populated like this:
Context.match() - the matched element whose siblings are
searched
Context.matchIndex() - the index of the matched element whose
siblings are searched
Context.element() - the sibling that is being filtered
Context.elementIndex() - the relative index of the sibling
that is being filtered. |
Match |
Match.siblings(String selector)
Get all siblings of every element in a set of matched elements, matching
a selector
The selector provided to this method supports the following features:
* can be used to select everything
tag names can be used to select XML elements by tag
names (see
Element.getElementsByTagName(String) . |
Match |
Match.slice(int start)
Reduce the set of matched elements by specifying a range of indexes
This is the same as calling
slice(start, Integer.MAX_VALUE) |
Match |
Match.slice(int start,
int end)
Reduce the set of matched elements by specifying a range of indexes
|
Match |
Match.sort(Comparator<Element> comparator)
Allows to sort the result with the given comparator.
|
Match |
Match.text(Content content)
Set some text content to all elements in the set of matched elements
(possibly replacing existing content).
|
Match |
Match.text(String content)
Set some text content to all elements in the set of matched elements
(possibly replacing existing content).
|
Match |
Match.transform(File transformer)
Transform all elements in the set of matched elements.
|
Match |
Match.transform(InputStream transformer)
Transform all elements in the set of matched elements.
|
Match |
Match.transform(Reader transformer)
Transform all elements in the set of matched elements.
|
Match |
Match.transform(Source transformer)
Transform all elements in the set of matched elements.
|
Match |
Match.transform(String transformer)
Transform all elements in the set of matched elements.
|
Match |
Match.transform(Transformer transformer)
Transform all elements in the set of matched elements.
|
Match |
Match.transform(URL transformer)
Transform all elements in the set of matched elements.
|
Match |
Match.unwrap()
Removes all elements in the set of matched elements from their parents
The resulting set of matched elements contains the newly unwrapped
elements
|
Match |
Match.wrap(Content parent)
Wrap all elements in the set of matched elements in a new parent element
The resulting set of matched elements contains the newly wrapped elements
|
Match |
Match.wrap(String parent)
Wrap all elements from their parent nodes in the set of matched elements
in a new parent element
The resulting set of matched elements contains the newly wrapped elements
|
Match |
Match.write(File file)
Write the set of matched elements into a file
If the set contains more or less than
1 element, this will
result in writing non-well-formed XML |
Match |
Match.write(OutputStream stream)
Write the set of matched elements into a stream
If the set contains more or less than
1 element, this will
result in writing non-well-formed XML |
Match |
Match.write(Writer writer)
Write the set of matched elements into a writer
If the set contains more or less than
1 element, this will
result in writing non-well-formed XML |
Match |
Match.xpath(String expression)
Match all elements given a certain XPath expression applied to each
element in the current set of matched elements.
|
Match |
Match.xpath(String expression,
Object... variables)
Match all elements given a certain XPath expression applied to each
element in the current set of matched elements.
|
Modifier and Type | Method and Description |
---|---|
List<Match> |
Match.each()
Get all elements in the set of matched elements in a list of matches,
every match representing one element
|
Modifier and Type | Method and Description |
---|---|
static Match |
JOOX.$(Match match)
Convenience method for calling
$(match) |
static Match |
JOOX.$(String name,
Match... content)
Create a new DOM element in an independent document
The added content is cloned into the new document
|
Match |
Match.add(Match... elements)
Add some elements to the set of matched elements
|
Match |
Match.after(Match... content)
Add content after each element in the set of matched elements.
|
Match |
Match.append(Match... content)
Append content to the end of each element's content in the set of matched
elements.
|
Match |
Match.before(Match... content)
Add content before each element in the set of matched elements.
|
Match |
Match.prepend(Match... content)
Prepend content to the beginning of each element's content in the set of
matched elements.
|
Match |
Match.replaceWith(Match... content)
Replace all elements in the set of matched elements with some new
content.
|
Copyright © 2015. All Rights Reserved.