Top Fields Constructors Methods
com.sun.xml.fastinfoset.stax.events

public Class StartElementEvent

extends EventBase
implements StartElement
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.StartElement, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Imports
java.util.ArrayList, .Collection, .HashMap, .Iterator, .List, .Map, javax.xml.namespace.NamespaceContext, .QName, javax.xml.stream.XMLStreamConstants, javax.xml.stream.events.Attribute, .Namespace, .StartElement

Field Summary

Modifier and TypeField and Description
private Map<QName, Attribute>
private NamespaceContext
private List<Namespace>
private QName
Inherited from com.sun.xml.fastinfoset.stax.events.EventBase:
_eventType_location

Constructor Summary

AccessConstructor and Description
public
public
StartElementEvent(String prefix, String uri, String localpart)

public
public

Method Summary

Modifier and TypeMethod and Description
public void
public final void
addAttributes(Iterator<? extends Attribute> attrs)

public void
public final void
addNamespaces(Iterator<? extends Namespace> namespaces)

public Attribute

Returns:

the attribute corresponding to the name value or null
getAttributeByName
(QName
the qname of the desired name
qname
)

Implements javax.xml.stream.events.StartElement.getAttributeByName.

Returns the attribute referred to by this name

public Iterator<Attribute>

Returns:

a readonly Iterator over Attribute interfaces, or an empty iterator
getAttributes
()

Implements javax.xml.stream.events.StartElement.getAttributes.

Returns an Iterator of non-namespace declared attributes returns an empty iterator if there are no attributes.

public QName

Returns:

the qualified name of this event
getName
()

Implements javax.xml.stream.events.StartElement.getName.

Get the name of this event

public String
public NamespaceContext

Returns:

the current namespace context
getNamespaceContext
()

Implements javax.xml.stream.events.StartElement.getNamespaceContext.

Gets a read-only namespace context.

public Iterator<Namespace>

Returns:

a readonly Iterator over Namespace interfaces, or an empty iterator if there are no namespaces.
getNamespaces
()

Implements javax.xml.stream.events.StartElement.getNamespaces.

Returns an Iterator of namespaces declared on this element.

public String

Returns:

the uri bound to the prefix or null
getNamespaceURI
(String
the prefix to lookup
prefix
)

Implements javax.xml.stream.events.StartElement.getNamespaceURI.

Gets the value that the prefix is bound to in the context of this element.

protected final void
init()

public String

Returns:

String Event returned as string.
nameAsString
()

Return this event as String

public void
public void
setName(QName qname)

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from com.sun.xml.fastinfoset.stax.events.EventBase:
asCharactersasEndElementasStartElementgetEventTypegetLocationgetSchemaTypegetSystemIdisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementsetEventTypesetLocationwriteAsEncodedUnicode

Field Detail

_attributesback to summary
private Map<QName, Attribute> _attributes
_contextback to summary
private NamespaceContext _context
_namespacesback to summary
private List<Namespace> _namespaces
_qnameback to summary
private QName _qname

Constructor Detail

StartElementEventback to summary
public StartElementEvent()
Annotations
@SuppressWarnings:this-escape
StartElementEventback to summary
public StartElementEvent(String prefix, String uri, String localpart)
Annotations
@SuppressWarnings:this-escape
StartElementEventback to summary
public StartElementEvent(QName qname)
Annotations
@SuppressWarnings:this-escape
StartElementEventback to summary
public StartElementEvent(StartElement startelement)

Method Detail

addAttributeback to summary
public void addAttribute(Attribute attr)
addAttributesback to summary
public final void addAttributes(Iterator<? extends Attribute> attrs)
addNamespaceback to summary
public void addNamespace(Namespace namespace)
addNamespacesback to summary
public final void addNamespaces(Iterator<? extends Namespace> namespaces)
getAttributeByNameback to summary
public Attribute getAttributeByName(QName qname)

Implements javax.xml.stream.events.StartElement.getAttributeByName.

Returns the attribute referred to by this name

Parameters
qname:QName

the qname of the desired name

Returns:Attribute

the attribute corresponding to the name value or null

Annotations
@Override
getAttributesback to summary
public Iterator<Attribute> getAttributes()

Implements javax.xml.stream.events.StartElement.getAttributes.

Returns an Iterator of non-namespace declared attributes returns an empty iterator if there are no attributes. The iterator must contain only implementations of the javax.xml.stream.Attribute interface. Attributes are fundamentally unordered and may not be reported in any order.

Returns:Iterator<Attribute>

a readonly Iterator over Attribute interfaces, or an empty iterator

Annotations
@Override
getNameback to summary
public QName getName()

Implements javax.xml.stream.events.StartElement.getName.

Get the name of this event

Returns:QName

the qualified name of this event

Annotations
@Override
getNamespaceback to summary
public String getNamespace()
getNamespaceContextback to summary
public NamespaceContext getNamespaceContext()

Implements javax.xml.stream.events.StartElement.getNamespaceContext.

Gets a read-only namespace context. If no context is available this method will return an empty namespace context. The NamespaceContext contains information about all namespaces in scope for this StartElement.

Returns:NamespaceContext

the current namespace context

Annotations
@Override
getNamespacesback to summary
public Iterator<Namespace> getNamespaces()

Implements javax.xml.stream.events.StartElement.getNamespaces.

Returns an Iterator of namespaces declared on this element. This Iterator does not contain previously declared namespaces unless they appear on the current START_ELEMENT. Therefore this list may contain redeclared namespaces and duplicate namespace declarations. Use the getNamespaceContext() method to get the current context of namespace declarations.

The iterator must contain only implementations of the javax.xml.stream.Namespace interface.

A Namespace is an Attribute. One can iterate over a list of namespaces as a list of attributes. However this method returns only the list of namespaces declared on this START_ELEMENT and does not include the attributes declared on this START_ELEMENT.

Returns:Iterator<Namespace>

a readonly Iterator over Namespace interfaces, or an empty iterator if there are no namespaces.

Annotations
@Override
getNamespaceURIback to summary
public String getNamespaceURI(String prefix)

Implements javax.xml.stream.events.StartElement.getNamespaceURI.

Gets the value that the prefix is bound to in the context of this element. Returns null if the prefix is not bound in this context

Parameters
prefix:String

the prefix to lookup

Returns:String

the uri bound to the prefix or null

Annotations
@Override
initback to summary
protected final void init()
nameAsStringback to summary
public String nameAsString()

Return this event as String

Returns:String

String Event returned as string.

resetback to summary
public void reset()
setNameback to summary
public void setName(QName qname)
setNamespaceContextback to summary
public void setNamespaceContext(NamespaceContext context)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override