## javanet.staxutils.events
Class StartElementEvent

    java.lang.Object
      javanet.staxutils.events.AbstractXMLEvent
          javanet.staxutils.events.StartElementEvent

All Implemented Interfaces:
  Serializable, Cloneable, ExtendedXMLEvent, StartElement, XMLEvent, XMLStreamConstants

    public class StartElementEvent

extends AbstractXMLEvent
implements StartElement

`StartElement` event implementation. This event will coalesce its namespaces into an internal `NamespaceContext`, available via `getNamespaceContext()`. It will also create any implicit namespaces necessary to satisfy the element's name and those of its attributes.

Version:
  $Revision: 1.5 $
Author:
  Christian Niles
See Also:
  Serialized Form

Field Summary
`protected Map` `attributes` The element attributes.
`protected QName` `name` The qualified element name.
`protected NamespaceContext` `namespaceCtx` The namespace context.
`protected Map` `namespaces` The element namespaces.

Fields inherited from class javanet.staxutils.events.AbstractXMLEvent
`location, schemaType`

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
`StartElementEvent(QName name, Iterator attributes, Iterator namespaces, NamespaceContext namespaceCtx, Location location, QName schemaType)`
`StartElementEvent(QName name, NamespaceContext namespaceCtx, Location location)`
`StartElementEvent(StartElement that)`

Method Summary
`Attribute` `getAttributeByName(QName name)`
`Iterator` `getAttributes()`
`int` `getEventType()` Returns `XMLStreamConstants.START_ELEMENT`.
`QName` `getName()`
`NamespaceContext` `getNamespaceContext()`
`Iterator` `getNamespaces()`
`String` `getNamespaceURI(String prefix)`

Methods inherited from class javanet.staxutils.events.AbstractXMLEvent
`asCharacters, asEndElement, asStartElement, clone, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, matches, toString, writeAsEncodedUnicode, writeEvent`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface javax.xml.stream.events.XMLEvent
`asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode`

Field Detail

### name

    protected QName name

  The qualified element name.

### attributes

    protected Map attributes

  The element attributes.

### namespaces

    protected Map namespaces

  The element namespaces.

### namespaceCtx

    protected NamespaceContext namespaceCtx

  The namespace context.

Constructor Detail

### StartElementEvent

    public StartElementEvent(QName name,
                             NamespaceContext namespaceCtx,
                             Location location)

### StartElementEvent

    public StartElementEvent(QName name,
                             Iterator attributes,
                             Iterator namespaces,
                             NamespaceContext namespaceCtx,
                             Location location,
                             QName schemaType)

### StartElementEvent

    public StartElementEvent(StartElement that)

Method Detail

### getEventType

    public int getEventType()

  Returns `XMLStreamConstants.START_ELEMENT`.

  Specified by:
    `getEventType` in interface `XMLEvent`

### getName

    public QName getName()

  Specified by:
    `getName` in interface `StartElement`

### getAttributeByName

    public Attribute getAttributeByName(QName name)

  Specified by:
    `getAttributeByName` in interface `StartElement`

### getAttributes

    public Iterator getAttributes()

  Specified by:
    `getAttributes` in interface `StartElement`

### getNamespaceContext

    public NamespaceContext getNamespaceContext()

  Specified by:
    `getNamespaceContext` in interface `StartElement`

### getNamespaces

    public Iterator getNamespaces()

  Specified by:
    `getNamespaces` in interface `StartElement`

### getNamespaceURI

    public String getNamespaceURI(String prefix)

  Specified by:
    `getNamespaceURI` in interface `StartElement`