Package org.simpleframework.xml.stream
Class DocumentReader.Start
java.lang.Object
java.util.AbstractCollection<Attribute>
java.util.AbstractList<Attribute>
java.util.ArrayList<Attribute>
org.simpleframework.xml.stream.EventElement
org.simpleframework.xml.stream.DocumentReader.Start
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Attribute>
,Collection<Attribute>
,List<Attribute>
,RandomAccess
,SequencedCollection<Attribute>
,EventNode
- Enclosing class:
DocumentReader
The
Start
object is used to represent the start of
an XML element. This will hold the attributes associated with
the element and will provide the name, the namespace reference
and the namespace prefix. For debugging purposes the source XML
element is provided for this start event.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Element
This is the element that is represented by this start event.Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis is used to acquire the attributes associated with the element.getName()
This provides the name of the event.This is used to acquire the namespace prefix associated with this node.This is used to acquire the namespace reference that this node is in.This is used to return the node for the event.Methods inherited from class org.simpleframework.xml.stream.EventElement
getLine, getValue, isEnd, isStart, isText
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll, reversed
-
Field Details
-
element
This is the element that is represented by this start event.
-
-
Constructor Details
-
Start
Constructor for theStart
object. This will wrap the provided node and expose the required details such as the name, namespace prefix and namespace reference. The provided element node can be acquired for debugging purposes.- Parameters:
element
- this is the element being wrapped by this
-
-
Method Details
-
getName
This provides the name of the event. This will be the name of an XML element the event represents. If there is a prefix associated with the element, this extracts that prefix.- Returns:
- this returns the name without the namespace prefix
-
getPrefix
This is used to acquire the namespace prefix associated with this node. A prefix is used to qualify an XML element or attribute within a namespace. So, if this represents a text event then a namespace prefix is not required.- Returns:
- this returns the namespace prefix for this event
-
getReference
This is used to acquire the namespace reference that this node is in. A namespace is normally associated with an XML element or attribute, so text events and element close events are not required to contain any namespace references.- Returns:
- this will provide the associated namespace reference
-
getAttributes
This is used to acquire the attributes associated with the element. Providing the attributes in this format allows the reader to build a list of attributes for the event.- Returns:
- this returns the attributes associated with this
-
getSource
This is used to return the node for the event. Because this represents a DOM element node the DOM node will be returned. Returning the node helps with certain debugging issues.- Returns:
- this will return the source object for this event
-