Package com.ctc.wstx.evt
Class CompactStartElement
- java.lang.Object
-
- org.codehaus.stax2.ri.evt.BaseEventImpl
-
- com.ctc.wstx.evt.BaseStartElement
-
- com.ctc.wstx.evt.CompactStartElement
-
- All Implemented Interfaces:
javax.xml.stream.events.StartElement
,javax.xml.stream.events.XMLEvent
,javax.xml.stream.XMLStreamConstants
,org.codehaus.stax2.evt.XMLEvent2
public class CompactStartElement extends BaseStartElement
WstxStartElement
implementation used when directly creating events from a stream reader.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<javax.xml.stream.events.Attribute>
mAttrList
Lazily created List that contains Attribute instances contained in this list.(package private) ElemAttrs
mAttrs
Container object that has enough information about attributes to be able to implement attribute accessor methods of this class.(package private) java.lang.String[]
mRawAttrs
Array needed for accessing actual String components of the attributesprivate static int
OFFSET_NS_PREFIX
private static int
OFFSET_NS_URI
private static int
OFFSET_VALUE
-
Fields inherited from class com.ctc.wstx.evt.BaseStartElement
mName, mNsCtxt
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompactStartElement(javax.xml.stream.Location loc, javax.xml.namespace.QName name, BaseNsContext nsCtxt, ElemAttrs attrs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.xml.stream.events.Attribute
constructAttr(java.lang.String[] raw, int rawIndex, boolean isDef)
javax.xml.stream.events.Attribute
getAttributeByName(javax.xml.namespace.QName name)
java.util.Iterator<javax.xml.stream.events.Attribute>
getAttributes()
protected void
outputNsAndAttr(java.io.Writer w)
protected void
outputNsAndAttr(javax.xml.stream.XMLStreamWriter w)
-
Methods inherited from class com.ctc.wstx.evt.BaseStartElement
asStartElement, equals, getEventType, getName, getNamespaceContext, getNamespaces, getNamespaceURI, hashCode, isStartElement, writeAsEncodedUnicode, writeUsing
-
Methods inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
addHash, asCharacters, asEndElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, iteratedEquals, stringsWithNullsEqual, throwFromIOE, toString
-
-
-
-
Field Detail
-
OFFSET_NS_URI
private static final int OFFSET_NS_URI
- See Also:
- Constant Field Values
-
OFFSET_NS_PREFIX
private static final int OFFSET_NS_PREFIX
- See Also:
- Constant Field Values
-
OFFSET_VALUE
private static final int OFFSET_VALUE
- See Also:
- Constant Field Values
-
mAttrs
final ElemAttrs mAttrs
Container object that has enough information about attributes to be able to implement attribute accessor methods of this class.
-
mRawAttrs
final java.lang.String[] mRawAttrs
Array needed for accessing actual String components of the attributes
-
mAttrList
private java.util.ArrayList<javax.xml.stream.events.Attribute> mAttrList
Lazily created List that contains Attribute instances contained in this list. Created only if there are at least 2 attributes.
-
-
Constructor Detail
-
CompactStartElement
protected CompactStartElement(javax.xml.stream.Location loc, javax.xml.namespace.QName name, BaseNsContext nsCtxt, ElemAttrs attrs)
-
-
Method Detail
-
getAttributeByName
public javax.xml.stream.events.Attribute getAttributeByName(javax.xml.namespace.QName name)
- Specified by:
getAttributeByName
in interfacejavax.xml.stream.events.StartElement
- Specified by:
getAttributeByName
in classBaseStartElement
-
getAttributes
public java.util.Iterator<javax.xml.stream.events.Attribute> getAttributes()
- Specified by:
getAttributes
in interfacejavax.xml.stream.events.StartElement
- Specified by:
getAttributes
in classBaseStartElement
-
outputNsAndAttr
protected void outputNsAndAttr(java.io.Writer w) throws java.io.IOException
- Specified by:
outputNsAndAttr
in classBaseStartElement
- Throws:
java.io.IOException
-
outputNsAndAttr
protected void outputNsAndAttr(javax.xml.stream.XMLStreamWriter w) throws javax.xml.stream.XMLStreamException
- Specified by:
outputNsAndAttr
in classBaseStartElement
- Throws:
javax.xml.stream.XMLStreamException
-
constructAttr
protected javax.xml.stream.events.Attribute constructAttr(java.lang.String[] raw, int rawIndex, boolean isDef)
-
-