Package org.simpleframework.xml.stream
Class NodeExtractor
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.AbstractSequentialList<E>
-
- java.util.LinkedList<org.w3c.dom.Node>
-
- org.simpleframework.xml.stream.NodeExtractor
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<org.w3c.dom.Node>
,java.util.Collection<org.w3c.dom.Node>
,java.util.Deque<org.w3c.dom.Node>
,java.util.List<org.w3c.dom.Node>
,java.util.Queue<org.w3c.dom.Node>
class NodeExtractor extends java.util.LinkedList<org.w3c.dom.Node>
TheNodeExtractor
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.
-
-
Constructor Summary
Constructors Constructor Description NodeExtractor(org.w3c.dom.Document source)
Constructor for theNodeExtractor
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
extract(org.w3c.dom.Document source)
This is used to extract the nodes of the document in such a way that it can be navigated as a queue.private void
extract(org.w3c.dom.Node source)
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, set, size, spliterator, toArray, toArray
-
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
-
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
-
-
-
-
Constructor Detail
-
NodeExtractor
public NodeExtractor(org.w3c.dom.Document source)
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 Detail
-
extract
private void extract(org.w3c.dom.Document source)
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
private void extract(org.w3c.dom.Node source)
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
-
-