de.trantor.xml.pullparser.event
Class StartTag

java.lang.Object
  |
  +--de.trantor.xml.pullparser.event.StartTag

public class StartTag
extends java.lang.Object
implements ParseEvent

A class for events indicating the start of a new element


Fields inherited from interface de.trantor.xml.pullparser.event.ParseEvent
CHARACTERS, COMMENT, END_DOCUMENT, END_TAG, IGNORABLE_WHITESPACE, PROCESSING_INSTRUCTION, START_TAG
 
Constructor Summary
StartTag(java.lang.String namespace, java.lang.String prefix, java.lang.String name, Attribute[] attributes, int attributeCount, java.util.Map newNamespaceDeclarations, java.util.Map allNamespaceDeclarations)
          creates a new StartTag
 
Method Summary
 java.util.Map getAllNamespaceDeclarations()
          returns a Map containing the prefix mappings defined at this element start tag
 Attribute getAttribute(int index)
          returns the attribute at the given index position
 Attribute getAttribute(java.lang.String name)
          returns the local attribute with the given name. convenience method for getAttribute (null, name);
 Attribute getAttribute(java.lang.String namespace, java.lang.String name)
          returns the local attribute with the given qualified name.
 int getAttributeCount()
          returns the number of attributes
 java.lang.String getName()
          returns the (local) name of the element started
 java.lang.String getNamespace()
          returns namespace
 java.util.Map getNewNamespaceDeclarations()
          returns a Map containing the prefix mappings defined at this element start tag
 java.lang.String getPrefix()
          returns namespace prefix
 int getType()
          returns the integer constant assigned to this event type (DocumentEvent.START_ELEMENT).
 java.lang.String toString()
          returns an writeable String representation of the StartTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StartTag

public StartTag(java.lang.String namespace,
                java.lang.String prefix,
                java.lang.String name,
                Attribute[] attributes,
                int attributeCount,
                java.util.Map newNamespaceDeclarations,
                java.util.Map allNamespaceDeclarations)
creates a new StartTag
Method Detail

getAttribute

public Attribute getAttribute(int index)
returns the attribute at the given index position

getAttribute

public Attribute getAttribute(java.lang.String name)
returns the local attribute with the given name. convenience method for getAttribute (null, name);

getAttribute

public Attribute getAttribute(java.lang.String namespace,
                              java.lang.String name)
returns the local attribute with the given qualified name.

getAttributeCount

public int getAttributeCount()
returns the number of attributes

getName

public java.lang.String getName()
returns the (local) name of the element started

getNamespace

public java.lang.String getNamespace()
returns namespace

getNewNamespaceDeclarations

public java.util.Map getNewNamespaceDeclarations()
returns a Map containing the prefix mappings defined at this element start tag

getAllNamespaceDeclarations

public java.util.Map getAllNamespaceDeclarations()
returns a Map containing the prefix mappings defined at this element start tag

getPrefix

public java.lang.String getPrefix()
returns namespace prefix

getType

public int getType()
returns the integer constant assigned to this event type (DocumentEvent.START_ELEMENT).
Specified by:
getType in interface ParseEvent

toString

public java.lang.String toString()
returns an writeable String representation of the StartTag
Overrides:
toString in class java.lang.Object