Package org.simpleframework.xml.stream
Class NodeExtractor
java.lang.Object
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Node>
,Collection<Node>
,Deque<Node>
,List<Node>
,Queue<Node>
,SequencedCollection<Node>
The
NodeExtractor
object is used to extract nodes
from a provided DOM document. This is used so that the nodes of
a given document can be read with queue like semantics, such
that the first node encountered is the first node taken from
the queue. Queue semantics help transform DOM documents to an
event stream much like the StAX framework.-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
This is used to extract the nodes of the document in such a way that it can be navigated as a queue.private void
This is used to extract the nodes of the element in such a way that it can be navigated as a queue.Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, reversed, set, size, spliterator, toArray, toArray
Methods inherited from class java.util.AbstractSequentialList
iterator
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, replaceAll, retainAll, sort, subList
-
Constructor Details
-
NodeExtractor
Constructor for theNodeExtractor
object. This is used to instantiate an object that flattens a document in to a queue so that the nodes can be used for streaming.- Parameters:
source
- this is the source document to be flattened
-
-
Method Details
-
extract
This is used to extract the nodes of the document in such a way that it can be navigated as a queue. In order to do this each node encountered is pushed in to the queue so that when finished the nodes can be dealt with as a stream.- Parameters:
source
- this is the source document to be flattened
-
extract
This is used to extract the nodes of the element in such a way that it can be navigated as a queue. In order to do this each node encountered is pushed in to the queue so that when finished the nodes can be dealt with as a stream.- Parameters:
source
- this is the source element to be flattened
-