Package com.ctc.wstx.evt
Class CompactStartElement
- java.lang.Object
-
- org.codehaus.stax2.ri.evt.BaseEventImpl
-
- com.ctc.wstx.evt.CompactStartElement
-
- All Implemented Interfaces:
StartElement
,XMLEvent
,XMLStreamConstants
,org.codehaus.stax2.evt.XMLEvent2
public class CompactStartElement extends org.codehaus.stax2.ri.evt.BaseEventImpl
WstxStartElement
implementation used when directly creating events from a stream reader.
-
-
Field Summary
Fields Modifier and Type Field Description protected QName
mName
protected BaseNsContext
mNsCtxt
-
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompactStartElement(Location loc, QName name, BaseNsContext nsCtxt, ElemAttrs attrs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StartElement
asStartElement()
protected Attribute
constructAttr(String[] raw, int rawIndex, boolean isDef)
boolean
equals(Object o)
Attribute
getAttributeByName(QName name)
Iterator<Attribute>
getAttributes()
int
getEventType()
QName
getName()
NamespaceContext
getNamespaceContext()
Iterator<Namespace>
getNamespaces()
String
getNamespaceURI(String prefix)
int
hashCode()
boolean
isStartElement()
protected void
outputNsAndAttr(Writer w)
protected void
outputNsAndAttr(XMLStreamWriter w)
void
writeAsEncodedUnicode(Writer w)
void
writeUsing(org.codehaus.stax2.XMLStreamWriter2 w)
-
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument
-
-
-
-
Field Detail
-
mName
protected final QName mName
-
mNsCtxt
protected final BaseNsContext mNsCtxt
-
-
Constructor Detail
-
CompactStartElement
protected CompactStartElement(Location loc, QName name, BaseNsContext nsCtxt, ElemAttrs attrs)
-
-
Method Detail
-
getAttributeByName
public Attribute getAttributeByName(QName name)
- Specified by:
getAttributeByName
in interfaceStartElement
-
getAttributes
public Iterator<Attribute> getAttributes()
- Specified by:
getAttributes
in interfaceStartElement
-
outputNsAndAttr
protected void outputNsAndAttr(Writer w) throws IOException
- Throws:
IOException
-
outputNsAndAttr
protected void outputNsAndAttr(XMLStreamWriter w) throws XMLStreamException
- Throws:
XMLStreamException
-
getName
public final QName getName()
- Specified by:
getName
in interfaceStartElement
-
getNamespaces
public Iterator<Namespace> getNamespaces()
- Specified by:
getNamespaces
in interfaceStartElement
-
getNamespaceContext
public NamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContext
in interfaceStartElement
-
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURI
in interfaceStartElement
-
asStartElement
public StartElement asStartElement()
- Specified by:
asStartElement
in interfaceXMLEvent
- Overrides:
asStartElement
in classorg.codehaus.stax2.ri.evt.BaseEventImpl
-
getEventType
public int getEventType()
- Specified by:
getEventType
in interfaceXMLEvent
- Specified by:
getEventType
in classorg.codehaus.stax2.ri.evt.BaseEventImpl
-
isStartElement
public boolean isStartElement()
- Specified by:
isStartElement
in interfaceXMLEvent
- Overrides:
isStartElement
in classorg.codehaus.stax2.ri.evt.BaseEventImpl
-
writeAsEncodedUnicode
public void writeAsEncodedUnicode(Writer w) throws XMLStreamException
- Specified by:
writeAsEncodedUnicode
in interfaceXMLEvent
- Specified by:
writeAsEncodedUnicode
in classorg.codehaus.stax2.ri.evt.BaseEventImpl
- Throws:
XMLStreamException
-
writeUsing
public void writeUsing(org.codehaus.stax2.XMLStreamWriter2 w) throws XMLStreamException
- Specified by:
writeUsing
in interfaceorg.codehaus.stax2.evt.XMLEvent2
- Specified by:
writeUsing
in classorg.codehaus.stax2.ri.evt.BaseEventImpl
- Throws:
XMLStreamException
-
equals
public boolean equals(Object o)
- Specified by:
equals
in classorg.codehaus.stax2.ri.evt.BaseEventImpl
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classorg.codehaus.stax2.ri.evt.BaseEventImpl
-
-