public interface Match extends Iterable<Element>
Element
 This is the main type of the jOOX library. It wraps an ordered list of DOM elements without duplicates and provides useful operations upon all of the contained elements. The wrapped DOM elements have been previously "matched" by a jOOX operation.
The API has been inspired by http://jquery.com, a fantastic DOM abstraction library for JavaScript.
| Modifier and Type | Method and Description | 
|---|---|
Match | 
add(Element... elements)
Add some elements to the set of matched elements 
 | 
Match | 
add(Match... elements)
Add some elements to the set of matched elements 
 | 
Match | 
after(Content content)
Add content after each element in the set of matched elements. 
 | 
Match | 
after(Element... content)
Add content after each element in the set of matched elements. 
 | 
Match | 
after(Match... content)
Add content after each element in the set of matched elements. 
 | 
Match | 
after(String content)
Add content after each element in the set of matched elements. 
 | 
Match | 
andSelf()
Add the previous set of matched elements to the current one. 
 | 
Match | 
append(Content content)
Append content to the end of each element's content in the set of matched
 elements. 
 | 
Match | 
append(Element... content)
Append content to the end of each element's content in the set of matched
 elements. 
 | 
Match | 
append(Match... content)
Append content to the end of each element's content in the set of matched
 elements. 
 | 
Match | 
append(String content)
Append content to the end of each element's content in the set of matched
 elements. 
 | 
String | 
attr(String name)
Get an attribute from the first element in the set of matched elements,
 or  
null if the first element does not have that attribute. | 
<T> T | 
attr(String name,
    Class<T> type)
Get a converted attribute from the first element in the set of matched
 elements, or  
null if the first element does not have that
 attribute. | 
Match | 
attr(String name,
    Content value)
Set an attribute on all elements in the set of matched elements. 
 | 
Match | 
attr(String name,
    String value)
Set an attribute on all elements in the set of matched elements. 
 | 
List<String> | 
attrs(String name)
Get an attribute from all elements in the set of matched elements
 
 jOOX is namespace-unaware. 
 | 
<T> List<T> | 
attrs(String name,
     Class<T> type)
Get a converted attribute from all elements in the set of matched
 elements
 
 jOOX is namespace-unaware. 
 | 
Match | 
before(Content content)
Add content before each element in the set of matched elements. 
 | 
Match | 
before(Element... content)
Add content before each element in the set of matched elements. 
 | 
Match | 
before(Match... content)
Add content before each element in the set of matched elements. 
 | 
Match | 
before(String content)
Add content before each element in the set of matched elements. 
 | 
Match | 
child()
Find the first child of each element in the current set of matched
 elements. 
 | 
Match | 
child(Filter filter)
Find the first matching child of each element in the current set of
 matched elements 
 | 
Match | 
child(int index)
Find the child at a given index of each element in the current set of
 matched elements. 
 | 
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 | 
children()
Find all children of each element in the current set of matched elements. 
 | 
Match | 
children(Filter filter)
Find all children of each element in the current set of matched elements. 
 | 
Match | 
children(int... indexes)
Find all children of each element at given indexes in the current set of
 matched elements. 
 | 
Match | 
children(String selector)
Find all children of each element in the current set of matched elements. 
 | 
String | 
content()
Get the XML content of the first element in the set of matched elements,
 or  
null if there are no matched elements
 
 This is the same as calling content(0) | 
Match | 
content(Content content)
Add some XML content to all elements in the set of matched elements
 (possibly replacing existing content). 
 | 
String | 
content(int index)
Get the XML content at a given index in the current set of matched
 elements. 
 | 
Match | 
content(Object content)
Add some JAXB-marshallable XML content to all elements in the set of
 matched elements (possibly replacing existing content). 
 | 
Match | 
content(String content)
Add some XML content to all elements in the set of matched elements
 (possibly replacing existing content). 
 | 
List<String> | 
contents()
Get all XML content of the elements in the set of matched elements. 
 | 
List<String> | 
contents(int... indexes)
Get all XML content of the elements at given indexes in the set of
 matched elements. 
 | 
Match | 
copy()
Get a copy of the  
Match wrapper. | 
Document | 
document()
Get the underlying document of the set of matched elements. 
 | 
List<Match> | 
each()
Get all elements in the set of matched elements in a list of matches,
 every match representing one element 
 | 
Match | 
each(Each... each)
Execute several callbacks for every element in the current set of matched
 elements. 
 | 
Match | 
each(Each each)
Execute a callback for every element in the current set of matched
 elements. 
 | 
Match | 
each(Iterable<? extends Each> each)
Execute several callbacks for every element in the current set of matched
 elements. 
 | 
Match | 
empty()
Removes all content from all elements in the set of matched elements. 
 | 
Match | 
eq(int... indexes)
Reduce the current set of matched elements to the elements at the given
 indexes. 
 | 
Match | 
filter(Filter filter)
Reduce the current set of matched elements. 
 | 
Match | 
filter(String selector)
Reduce the current set of matched elements. 
 | 
Match | 
find()
Find all descendants of each element in the current set of matched
 elements. 
 | 
Match | 
find(Filter filter)
Find all descendants of each element in the current set of matched
 elements. 
 | 
Match | 
find(String selector)
Find all descendants of each element in the current set of matched
 elements. 
 | 
Match | 
first()
Get the first in a set of matched elements. 
 | 
List<Element> | 
get()
Get an the set of matched elements 
 | 
List<Element> | 
get(int... indexes)
Get some elements from the set of matched elements at the given indexes
 
 Negative indexes are possible, too. 
 | 
Element | 
get(int index)
Get an element from the set of matched elements at a given index
 
 Negative indexes are possible, too. 
 | 
Match | 
has(Filter filter)
Reduce the set of matched element to those who have a descendant that
 matches a filter. 
 | 
Match | 
has(String selector)
Reduce the set of matched element to those who have a descendant that
 matches a selector. 
 | 
String | 
id()
Get the first id value
 
 This is the same as calling  
id(0) | 
<T> T | 
id(Class<T> type)
Get the first converted id value 
 | 
String | 
id(int index)
Get an id value at a given index in the current set of matched elements. 
 | 
List<String> | 
ids()
Get a list of id values in the current set of matched elements. 
 | 
<T> List<T> | 
ids(Class<T> type)
Get a list of converted id values in the current set of matched elements. 
 | 
List<String> | 
ids(int... indexes)
Get a list of id values at given indexes in the current set of matched
 elements. 
 | 
boolean | 
is(Filter filter)
Check if at least one element in the set of matched elements satisfies a
 filter. 
 | 
boolean | 
is(String selector)
Check if at least one element in the set of matched elements satisfies a
 selector. 
 | 
boolean | 
isEmpty()
Whether there are any matched elements in the set of matched elements 
 | 
boolean | 
isNotEmpty()
Whether there are any matched elements in the set of matched elements 
 | 
Match | 
last()
Get the last in a set of matched elements. 
 | 
Match | 
leaf()
Reduce the set of matched elements to the ones that are leaf elements 
 | 
<E> List<E> | 
map(Mapper<E> map)
Map the set of matched elements to a list of something 
 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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) | 
String | 
namespacePrefix()
Get the namespace prefix of the first element in the current set of
 matched elements. 
 | 
String | 
namespacePrefix(int index)
Get a namespace prefix of the element at a given index in the current set
 of matched elements. 
 | 
List<String> | 
namespacePrefixes()
Get a list of namespace prefixes of the elements in the current set of
 matched elements. 
 | 
List<String> | 
namespacePrefixes(int... indexes)
Get a list of namespace prefixes of the elements at given indexes in the
 current set of matched elements. 
 | 
Match | 
namespaces(Map<String,String> map)
Get a new Match with added namespace configuration for subsequent XPath
 calls 
 | 
String | 
namespaceURI()
Get the namespace URI of the first element in the current set of matched
 elements. 
 | 
String | 
namespaceURI(int index)
Get a namespace URI of the element at a given index in the current set of
 matched elements. 
 | 
List<String> | 
namespaceURIs()
Get a list of namespace URIs of the elements in the current set of
 matched elements. 
 | 
List<String> | 
namespaceURIs(int... indexes)
Get a list of namespace URIs of the elements at given indexes in the
 current set of matched elements. 
 | 
Match | 
next()
Get the immediate next sibling of every element in set of matched
 elements. 
 | 
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 | 
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 | 
nextAll()
Get all next siblings of every element in a set of matched elements 
 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
not(Filter filter)
Remove elements from the set of matched elements. 
 | 
Match | 
not(String selector)
Remove elements from the set of matched elements. 
 | 
Match | 
parent()
Get the immediate parent elements of every element in a set of matched
 elements 
 | 
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 | 
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 | 
parents()
Get all ancestor elements of every element in a set of matched elements 
 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
prepend(Content content)
Prepend content to the beginning of each element's content in the set of
 matched elements. 
 | 
Match | 
prepend(Element... content)
Prepend content to the beginning of each element's content in the set of
 matched elements. 
 | 
Match | 
prepend(Match... content)
Prepend content to the beginning of each element's content in the set of
 matched elements. 
 | 
Match | 
prepend(String content)
Prepend content to the beginning of each element's content in the set of
 matched elements. 
 | 
Match | 
prev()
Get the immediate previous sibling of every element in set of matched
 elements. 
 | 
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 | 
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 | 
prevAll()
Get all previous siblings of every element in a set of matched elements 
 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
remove()
Removes all elements from their parent nodes in the set of matched
 elements. 
 | 
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 | 
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 | 
removeAttr(String name)
Remove an attribute from all elements in the set of matched elements. 
 | 
Match | 
rename(Content tag)
Rename all tags in the set of matched elements to some new tag name 
 | 
Match | 
rename(String tag)
Rename all tags in the set of matched elements to some new tag name 
 | 
Match | 
replaceWith(Content content)
Replace all elements in the set of matched elements with some new
 content. 
 | 
Match | 
replaceWith(Element... content)
Replace all elements in the set of matched elements with some new
 content. 
 | 
Match | 
replaceWith(Match... content)
Replace all elements in the set of matched elements with some new
 content. 
 | 
Match | 
replaceWith(String content)
Replace all elements in the set of matched elements with some new
 content. 
 | 
Match | 
reverse()
Reverse the order of the set of matched elements 
 | 
Match | 
siblings()
Get all siblings of every element in a set of matched elements 
 | 
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 | 
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). | 
int | 
size()
Get the number of matched elements in the set of matched elements 
 | 
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 | 
slice(int start,
     int end)
Reduce the set of matched elements by specifying a range of indexes 
 | 
Match | 
sort(Comparator<Element> comparator)
Allows to sort the result with the given comparator. 
 | 
String | 
tag()
Get the tag name of the first element in the current set of matched
 elements. 
 | 
String | 
tag(int index)
Get a tag name of the element at a given index in the current set of
 matched elements. 
 | 
List<String> | 
tags()
Get a list of tag names of the elements in the current set of matched
 elements. 
 | 
List<String> | 
tags(int... indexes)
Get a list of tag names of the elements at given indexes in the current
 set of matched elements. 
 | 
String | 
text()
Get the text content of the first element in the set of matched elements,
 or  
null if there are no matched elements. | 
<T> T | 
text(Class<T> type)
Get the converted text content of the first element in the set of matched
 elements, or  
null if there are no matched elements. | 
Match | 
text(Content content)
Set some text content to all elements in the set of matched elements
 (possibly replacing existing content). 
 | 
String | 
text(int index)
Get the text content at a given index in the current set of matched
 elements. 
 | 
Match | 
text(String content)
Set some text content to all elements in the set of matched elements
 (possibly replacing existing content). 
 | 
List<String> | 
texts()
Get all text content of the elements in the set of matched elements. 
 | 
<T> List<T> | 
texts(Class<T> type)
Get all converted text content of the elements in the set of matched
 elements. 
 | 
List<String> | 
texts(int... indexes)
Get all text content of the elements at given indexes in the set of
 matched elements. 
 | 
Match | 
transform(File transformer)
Transform all elements in the set of matched elements. 
 | 
Match | 
transform(InputStream transformer)
Transform all elements in the set of matched elements. 
 | 
Match | 
transform(Reader transformer)
Transform all elements in the set of matched elements. 
 | 
Match | 
transform(Source transformer)
Transform all elements in the set of matched elements. 
 | 
Match | 
transform(String transformer)
Transform all elements in the set of matched elements. 
 | 
Match | 
transform(Transformer transformer)
Transform all elements in the set of matched elements. 
 | 
Match | 
transform(URL transformer)
Transform all elements in the set of matched elements. 
 | 
<T> List<T> | 
unmarshal(Class<T> type)
Unmarshal the current set of matched elements into a JAXB-annotated type. 
 | 
<T> List<T> | 
unmarshal(Class<T> type,
         int... indexes)
Unmarshal the current set of matched elements at given indexes into a
 JAXB-annotated type. 
 | 
<T> T | 
unmarshalOne(Class<T> type)
Unmarshal the first element in the current set of matched elements into a
 JAXB-annotated type. 
 | 
<T> T | 
unmarshalOne(Class<T> type,
            int index)
Unmarshal the element at a given index in the current set of matched
 elements into a JAXB-annotated type. 
 | 
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 | 
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 | 
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 | 
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 | 
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 | 
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 | 
String | 
xpath()
Get an XPath expression describing the first element in the current set
 of matched elements
 
 This is the same as calling  
xpath(0) | 
String | 
xpath(int index)
Get an XPath expression describing the element at a given index in the
 current set of matched elements 
 | 
Match | 
xpath(String expression)
Match all elements given a certain XPath expression applied to each
 element in the current set of matched elements. 
 | 
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. 
 | 
List<String> | 
xpaths()
Get a list of XPath expressions describing the elements in the current
 set of matched elements 
 | 
List<String> | 
xpaths(int... indexes)
Get a list of XPath expressions describing the elements at the given
 indexes in the current set of matched elements 
 | 
forEach, iterator, spliteratorMatch namespace(String namespacePrefix, String namespaceURI)
 This is a convenience method for namespace(String, String)
namespacePrefix - A namespace prefixnamespaceURI - A namespace URIMatchnamespaces(Map)Match namespaces(Map<String,String> map)
map - A mapping between prefix and namespace URIMatchList<String> namespaceURIs()
This only works if the underlying document is namespace-aware
Node.getNamespaceURI()List<String> namespaceURIs(int... indexes)
This only works if the underlying document is namespace-aware
Node.getNamespaceURI()String namespaceURI()
 This is the same as calling namespaceURI(0)
 
This only works if the underlying document is namespace-aware
Node.getNamespaceURI()String namespaceURI(int index)
This only works if the underlying document is namespace-aware
Node.getNamespaceURI()List<String> namespacePrefixes()
List<String> namespacePrefixes(int... indexes)
String namespacePrefix()
 This is the same as calling namespaceURI(0)
String namespacePrefix(int index)
Element get(int index)
Negative indexes are possible, too.
-1 corresponds to the last element in the set of matched
 elements.-2 corresponds to the second-last element, etc.Document document()
This will also return a document if there are no elements in the set of matched elements, either because a new document has been created previously, or the set of matched elements has been reduced to an empty set.
List<Element> get(int... indexes)
Negative indexes are possible, too.
-1 corresponds to the last element in the set of matched
 elements.-2 corresponds to the second-last element, etc.int size()
boolean isEmpty()
boolean isNotEmpty()
Match reverse()
Match andSelf()
child()children()find()next()nextAll()nextUntil(Filter)parent()parents()parentsUntil(Filter)prev()prevAll()prevUntil(Filter)siblings()eq(int...), and then add the removed
 elements again, using andSelf().Match child()
 This is the same as calling child(0).
Match child(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match child(Filter filter)
Match child(int index)
Match children()
Match children(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match children(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose children are
 searchedContext.matchIndex() - the index of the matched element whose
 children are searchedContext.element() - the child candidate that is being
 filteredContext.elementIndex() - the index within its parent of the
 child candidate that is being filteredMatch children(int... indexes)
List<Match> each()
Match each(Each each)
Match each(Each... each)
JOOX.chain(Each...)Match each(Iterable<? extends Each> each)
JOOX.chain(Iterable)Match filter(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match filter(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element being filteredContext.matchIndex() - the index of the matched element being
 filteredMatch eq(int... indexes)
Negative indexes are possible, too.
-1 corresponds to the last element in the set of matched
 elements.-2 corresponds to the second-last element, etc.Match find()
Match find(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String) Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredCSS2XPath.css2xpath(String))xpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match find(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose descendants are
 searchedContext.matchIndex() - the index of the matched element whose
 descendants are searchedContext.element() - the descendant candidate that is being
 filteredContext.elementIndex() - the iteration index of the
 descendant candidate that is being filteredMatch xpath(String expression)
 The XPath expression is evaluated using standard
 XPath. It must not contain any variables. Use
 xpath(String, Object...) instead, if you wish to use variables.
 Note that only matched elements will be considered in the results. You
 cannot match attributes or text nodes, for instance. Examples:
 
xpath("//*")xpath("/library/books/book")xpath("//book").ids()xpath("//book/name").texts()xpath("//book/@id")xpath("//book/name/text()")
 Namespace declarations are supported in XPath expressions. If you wish to
 use namespace-specific XPath elements, call
 namespace(String, String) prior to xpath(String)
 
If Xalan is on your classpath, jOOX will automatically load xalan's namespace and function extensions. All functionality supported by http://exslt.org will be available in your XPath expressions. Some examples:
xpath("//book[number(@id) = math:max(//book/@id)]")xpath("//book[java:org.joox.test.Functions.byOrwellWithNodes(.)]
 Match xpath(String expression, Object... variables)
 The XPath expression is evaluated using standard
 XPath. It may contain numerical variables,
 declared as $1, $2, etc, starting with
 $1. Other variables, such as $myVar are not
 supported. You must provide at least one variable in the
 variables argument for every variable index. Note that only
 matched elements will be considered in the results. You cannot match
 attributes or text nodes, for instance. Examples:
 
xpath("//*[@id > $1]", 5)xpath("/library/books/book[count(authors/author) > $1][authors/author[text() = $2]]", 2, "George Orwell")
 xpath("//book/@id")xpath("//book/name/text()")
 Namespace declarations are supported in XPath expressions. If you wish to
 use namespace-specific XPath elements, call
 namespace(String, String) prior to xpath(String)
 
If Xalan is on your classpath, jOOX will automatically load xalan's namespace and function extensions. All functionality supported by http://exslt.org will be available in your XPath expressions. Some examples:
xpath("//book[number(@id) = math:max(//book/@id)]")xpath("//book[java:org.joox.test.Functions.byOrwellWithNodes(.)]
 Match first()
Match has(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match has(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose descendants are
 searchedContext.matchIndex() - the index of the matched element whose
 descendants are searchedContext.element() - the descendant candidate that is being
 filteredContext.elementIndex() - the iteration index of the
 descendant candidate that is being filteredboolean is(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)boolean is(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element being checkedContext.matchIndex() - the index of the matched element being
 checkedMatch last()
Match next()
Match next(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match next(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose next sibling is
 searchedContext.matchIndex() - the index of the matched element whose
 next sibling is searchedContext.element() - the next sibling that is being filteredContext.elementIndex() - 1Match nextAll()
Match nextAll(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match nextAll(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose next siblings are
 searchedContext.matchIndex() - the index of the matched element whose
 next siblings are searchedContext.element() - the next siblings that is being filteredContext.elementIndex() - the relative index of the next
 siblings that are being filteredMatch nextUntil(String until)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match nextUntil(Filter until)
 The callback Context is populated like this:
 
Context.match() - the matched element whose next siblings are
 searchedContext.matchIndex() - the index of the matched element whose
 next siblings are searchedContext.element() - the next siblings that is being filteredContext.elementIndex() - the relative index of the next
 siblings that are being filteredMatch nextUntil(String until, String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match nextUntil(String until, Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose next siblings are
 searchedContext.matchIndex() - the index of the matched element whose
 next siblings are searchedContext.element() - the next siblings that is being filteredContext.elementIndex() - the relative index of the next
 siblings that are being filteredJOOX.selector(String)Match nextUntil(Filter until, String selector)
 The callback Context is populated like this:
 
Context.match() - the matched element whose next siblings are
 searchedContext.matchIndex() - the index of the matched element whose
 next siblings are searchedContext.element() - the next siblings that is being filteredContext.elementIndex() - the relative index of the next
 siblings that are being filteredJOOX.selector(String)Match nextUntil(Filter until, Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose next siblings are
 searchedContext.matchIndex() - the index of the matched element whose
 next siblings are searchedContext.element() - the next siblings that is being filteredContext.elementIndex() - the relative index of the next
 siblings that are being filteredJOOX.selector(String)Match not(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match not(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element being checkedContext.matchIndex() - the index of the matched element being
 checkedMatch parent()
Match parent(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match parent(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose parent is
 searchedContext.matchIndex() - the index of the matched element whose
 parent is searchedContext.element() - the parent that is being filteredContext.elementIndex() - 1Match parents()
Match parents(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match parents(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose parents are
 searchedContext.matchIndex() - the index of the matched element whose
 parents are searchedContext.element() - the parent that is being filteredContext.elementIndex() - the relative index of the parent
 that is being filteredMatch parentsUntil(String until)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match parentsUntil(Filter until)
 The callback Context is populated like this:
 
Context.match() - the matched element whose parents are
 searchedContext.matchIndex() - the index of the matched element whose
 parents are searchedContext.element() - the parent that is being filteredContext.elementIndex() - the relative index of the parent
 that is being filteredMatch parentsUntil(String until, String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match parentsUntil(String until, Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose parents are
 searchedContext.matchIndex() - the index of the matched element whose
 parents are searchedContext.element() - the parent that is being filteredContext.elementIndex() - the relative index of the parent
 that is being filteredJOOX.selector(String)Match parentsUntil(Filter until, String selector)
 The callback Context is populated like this:
 
Context.match() - the matched element whose parents are
 searchedContext.matchIndex() - the index of the matched element whose
 parents are searchedContext.element() - the parent that is being filteredContext.elementIndex() - the relative index of the parent
 that is being filteredJOOX.selector(String)Match parentsUntil(Filter until, Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose parents are
 searchedContext.matchIndex() - the index of the matched element whose
 parents are searchedContext.element() - the parent that is being filteredContext.elementIndex() - the relative index of the parent
 that is being filteredMatch prev()
Match prev(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match prev(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose previous sibling
 is searchedContext.matchIndex() - the index of the matched element whose
 previous sibling is searchedContext.element() - the previous sibling that is being
 filteredContext.elementIndex() - 1Match prevAll()
Match prevAll(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match prevAll(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose previous siblings
 are searchedContext.matchIndex() - the index of the matched element whose
 previous siblings are searchedContext.element() - the previous siblings that is being
 filteredContext.elementIndex() - the relative index of the previous
 siblings that are being filteredMatch prevUntil(String until)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match prevUntil(Filter until)
 The callback Context is populated like this:
 
Context.match() - the matched element whose previous siblings
 are searchedContext.matchIndex() - the index of the matched element whose
 previous siblings are searchedContext.element() - the previous siblings that is being
 filteredContext.elementIndex() - the relative index of the previous
 siblings that are being filteredMatch prevUntil(String until, String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match prevUntil(String until, Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose previous siblings
 are searchedContext.matchIndex() - the index of the matched element whose
 previous siblings are searchedContext.element() - the previous siblings that is being
 filteredContext.elementIndex() - the relative index of the previous
 siblings that are being filteredJOOX.selector(String)Match prevUntil(Filter until, String selector)
 The callback Context is populated like this:
 
Context.match() - the matched element whose previous siblings
 are searchedContext.matchIndex() - the index of the matched element whose
 previous siblings are searchedContext.element() - the previous siblings that is being
 filteredContext.elementIndex() - the relative index of the previous
 siblings that are being filteredJOOX.selector(String)Match prevUntil(Filter until, Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose previous siblings
 are searchedContext.matchIndex() - the index of the matched element whose
 previous siblings are searchedContext.element() - the previous siblings that is being
 filteredContext.elementIndex() - the relative index of the previous
 siblings that are being filteredMatch siblings()
Match siblings(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match siblings(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element whose siblings are
 searchedContext.matchIndex() - the index of the matched element whose
 siblings are searchedContext.element() - the sibling that is being filteredContext.elementIndex() - the relative index of the sibling
 that is being filtered. This is less than zero if it is a previous
 sibling or more than zero if it is a subsequent sibling, compared to the
 element in Context.match()Match slice(int start)
 This is the same as calling slice(start, Integer.MAX_VALUE)
Match slice(int start, int end)
Match matchText(String regex)
 This is the same as calling matchText(regex, true)
JOOX.matchText(String)Match matchText(String regex, boolean keepMatches)
(keepMatches = true), or
 those whose text content matches a given regex
 (keepMatches = false)JOOX.matchText(String)Match matchAttr(String name, String valueRegex)
 This is the same as calling matchAttr(name, valueRegex, true)
JOOX.matchAttr(String, String)Match matchAttr(String name, String valueRegex, boolean keepMatches)
(keepMatches = true), or
 those whose text content matches a given regex
 (keepMatches = false)JOOX.matchAttr(String, String)Match matchTag(String regex)
 This is the same as calling matchText(regex, true)
JOOX.matchTag(String)Match matchTag(String regex, boolean keepMatches)
(keepMatches = true), or those
 whose tag name matches a given regex (keepMatches = false)JOOX.matchTag(String)Match leaf()
JOOX.leaf()Match before(Content content)
 The callback Context is populated like this:
 
Context.match() - the matched element being prepended beforeContext.matchIndex() - the index of the matched element being
 prepended beforeMatch before(Match... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match before(Element... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match after(Content content)
 The callback Context is populated like this:
 
Context.match() - the matched element being appended afterContext.matchIndex() - the index of the matched element being
 appended afterMatch after(Match... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match after(Element... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match prepend(String content)
Match prepend(Content content)
 The callback Context is populated like this:
 
Context.match() - the matched element being prepended toContext.matchIndex() - the index of the matched element being
 prepended toMatch prepend(Match... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match prepend(Element... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match append(String content)
Match append(Content content)
 The callback Context is populated like this:
 
Context.match() - the matched element being appended toContext.matchIndex() - the index of the matched element being
 appended toMatch append(Match... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match append(Element... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match replaceWith(String content)
Match replaceWith(Content content)
Match replaceWith(Match... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match replaceWith(Element... content)
If the added content is already contained in this document, then it is moved. Otherwise, it is cloned. If there are several elements in the set of matched elements, then the added content is duplicated.
Match rename(Content tag)
Match empty()
Match remove()
Match remove(String selector)
The selector provided to this method supports the following features:
Element.getElementsByTagName(String). Tag names are
 namespace-unaware. This means that existing namespaces will be ignoredfind(String) insteadxpath(String)
 insteadxpath(String) with namespaces(Map) insteadJOOX.selector(String)Match remove(Filter filter)
 The callback Context is populated like this:
 
Context.match() - the matched element being removedContext.matchIndex() - the index of the matched element being
 removedMatch wrap(String parent)
The resulting set of matched elements contains the newly wrapped elements
unwrap()Match wrap(Content parent)
The resulting set of matched elements contains the newly wrapped elements
unwrap()Match unwrap()
The resulting set of matched elements contains the newly unwrapped elements
wrap(String)String attr(String name)
null if the first element does not have that attribute.
 jOOX is namespace-unaware. The supplied attribute name will be compared against all attributes, matching the first one that has the given name.
<T> T attr(String name, Class<T> type)
null if the first element does not have that
 attribute.
 jOOX is namespace-unaware. The supplied attribute name will be compared against all attributes, matching the first one that has the given name.
JOOX.convert(String, Class)List<String> attrs(String name)
jOOX is namespace-unaware. The supplied attribute name will be compared against all attributes, matching the first one that has the given name.
<T> List<T> attrs(String name, Class<T> type)
jOOX is namespace-unaware. The supplied attribute name will be compared against all attributes, matching the first one that has the given name.
JOOX.convert(String, Class)Match attr(String name, String value)
value is null, then the attribute is removed. If the
 attribute already exists, then it is replaced.Match attr(String name, Content value)
value returns null, then the attribute is removed. If the
 attribute already exists, then it is replaced.
 
 The callback Context is populated like this:
 
Context.match() - the matched element being attributedContext.matchIndex() - the index of the matched element being
 attributedMatch removeAttr(String name)
attr(name, null).List<String> contents()
List<String> contents(int... indexes)
String content()
null if there are no matched elements
 
 This is the same as calling content(0)
String content(int index)
Match content(String content)
text(String)Match content(Object content)
JOOX.$(Object), 
JOOX.content(Object)Match content(Content content)
text(String)
 
 The callback Context is populated like this:
 
Context.match() - the matched element being added toContext.matchIndex() - the index of the matched element being
 added to<T> List<T> texts(Class<T> type)
JOOX.convert(String, Class)List<String> texts(int... indexes)
String text()
null if there are no matched elements.
 
 This is the same as calling text(0)
<T> T text(Class<T> type)
null if there are no matched elements.JOOX.convert(String, Class)String text(int index)
Match text(String content)
Match text(Content content)
 The callback Context is populated like this:
 
Context.match() - the matched element being added toContext.matchIndex() - the index of the matched element being
 added toMatch copy()
List<String> xpaths()
List<String> xpaths(int... indexes)
String xpath()
 This is the same as calling xpath(0)
String xpath(int index)
List<String> tags()
List<String> tags(int... indexes)
String tag()
 This is the same as calling tag(0)
String tag(int index)
List<String> ids()
 This is the same as calling attrs("id")
List<String> ids(int... indexes)
<T> List<T> ids(Class<T> type)
JOOX.convert(String, Class)String id()
 This is the same as calling id(0)
String id(int index)
 This is the same as calling eq(index).attr("id")
<T> T id(Class<T> type)
JOOX.convert(String, Class)Match write(Writer writer) throws IOException
 If the set contains more or less than 1 element, this will
 result in writing non-well-formed XML
IOExceptionMatch write(OutputStream stream) throws IOException
 If the set contains more or less than 1 element, this will
 result in writing non-well-formed XML
IOExceptionMatch write(File file) throws IOException
 If the set contains more or less than 1 element, this will
 result in writing non-well-formed XML
IOException<T> List<T> unmarshal(Class<T> type)
<T> List<T> unmarshal(Class<T> type, int... indexes)
<T> T unmarshalOne(Class<T> type)
 This is the same as calling unmarshalOne(type, 0)
<T> T unmarshalOne(Class<T> type, int index)
 This is the same as calling unmarshalOne(type, 0)
Match transform(Transformer transformer)
 This will apply a given Transformer to every element in the set
 of matched elements. Every element in the set of matched elements will be
 replaced by its corresponding Result obtained from the
 transformer.
 
 
 <books>
   <book id="1"/>
   <book id="2"/>
 </books>
 
 
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:template match="book">
         <book id="">
             <xsl:apply-templates/>
         </book>
     </xsl:template>
     <xsl:template match="@*|*">
         <xsl:copy>
             <xsl:apply-templates select="*|@*"/>
         </xsl:copy>
     </xsl:template>
 </xsl:stylesheet>
 
 
 // Applies transformation to the document element:
 $(document).transform("increment.xsl");
 // Applies transformation to every book element:
 $(document).find("book").transform("increment.xsl");
 
 
 <books>
   <book id="2"/>
   <book id="3"/>
 </books>
 
Match transform(Source transformer)
transform(Transformer)Match transform(InputStream transformer)
transform(Transformer)Match transform(Reader transformer)
transform(Transformer)Match transform(URL transformer)
transform(Transformer)Match transform(File transformer)
transform(Transformer)Match transform(String transformer)
transform(Transformer)Match sort(Comparator<Element> comparator)
comparator - The element comparator.Copyright © 2015. All Rights Reserved.