com.ctc.wstx.evt
Class SimpleStartElement
java.lang.Object
org.codehaus.stax2.ri.evt.BaseEventImpl
com.ctc.wstx.evt.SimpleStartElement
- All Implemented Interfaces:
- StartElement, XMLEvent, XMLStreamConstants, org.codehaus.stax2.evt.XMLEvent2
public class SimpleStartElement
- extends org.codehaus.stax2.ri.evt.BaseEventImpl
Wstx StartElement implementation used when event is constructed
from already objectified data, for example when constructed by the event
factory.
| Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl |
mLocation |
| 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 |
| 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 interface javax.xml.stream.events.XMLEvent |
asCharacters, asEndElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument |
mName
protected final QName mName
mNsCtxt
protected final BaseNsContext mNsCtxt
SimpleStartElement
protected SimpleStartElement(Location loc,
QName name,
BaseNsContext nsCtxt,
Map attr)
construct
public static SimpleStartElement construct(Location loc,
QName name,
Map attrs,
List ns,
NamespaceContext nsCtxt)
- Factory method called when a start element needs to be constructed
from an external source (most likely, non-woodstox stream reader).
construct
public static SimpleStartElement construct(Location loc,
QName name,
Iterator attrs,
Iterator ns,
NamespaceContext nsCtxt)
getAttributeByName
public Attribute getAttributeByName(QName name)
- Specified by:
getAttributeByName in interface StartElement
getAttributes
public Iterator getAttributes()
- Specified by:
getAttributes in interface StartElement
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 interface StartElement
getNamespaces
public Iterator getNamespaces()
- Specified by:
getNamespaces in interface StartElement
getNamespaceContext
public NamespaceContext getNamespaceContext()
- Specified by:
getNamespaceContext in interface StartElement
getNamespaceURI
public String getNamespaceURI(String prefix)
- Specified by:
getNamespaceURI in interface StartElement
asStartElement
public StartElement asStartElement()
- Specified by:
asStartElement in interface XMLEvent- Overrides:
asStartElement in class org.codehaus.stax2.ri.evt.BaseEventImpl
getEventType
public int getEventType()
- Specified by:
getEventType in interface XMLEvent- Specified by:
getEventType in class org.codehaus.stax2.ri.evt.BaseEventImpl
isStartElement
public boolean isStartElement()
- Specified by:
isStartElement in interface XMLEvent- Overrides:
isStartElement in class org.codehaus.stax2.ri.evt.BaseEventImpl
writeAsEncodedUnicode
public void writeAsEncodedUnicode(Writer w)
throws XMLStreamException
- Specified by:
writeAsEncodedUnicode in interface XMLEvent- Specified by:
writeAsEncodedUnicode in class org.codehaus.stax2.ri.evt.BaseEventImpl
- Throws:
XMLStreamException
writeUsing
public void writeUsing(org.codehaus.stax2.XMLStreamWriter2 w)
throws XMLStreamException
- Specified by:
writeUsing in interface org.codehaus.stax2.evt.XMLEvent2- Specified by:
writeUsing in class org.codehaus.stax2.ri.evt.BaseEventImpl
- Throws:
XMLStreamException
equals
public boolean equals(Object o)
- Specified by:
equals in class org.codehaus.stax2.ri.evt.BaseEventImpl
hashCode
public int hashCode()
- Specified by:
hashCode in class org.codehaus.stax2.ri.evt.BaseEventImpl
Copyright © 2011 Codehaus. All Rights Reserved.