org.daisy.zedval.engine
Class XmlFileElement

java.lang.Object
  extended byorg.daisy.zedval.engine.XmlFileElement

public class XmlFileElement
extends java.lang.Object

An XML Element descriptor, similar to the javax.xml.stream.StartElement, but with less footprint.

Author:
Markus Gylling

Constructor Summary
XmlFileElement(java.lang.String qName, java.lang.String localName, java.lang.String nsURI, org.xml.sax.Attributes attrs)
           
 
Method Summary
 java.lang.String getAttributeValueL(java.lang.String localName)
           
 java.lang.String getAttributeValueNS(java.lang.String nsURI, java.lang.String localName)
           
 java.lang.String getAttributeValueQ(java.lang.String qName)
           
 java.lang.String getLocalName()
           
 java.lang.String getNsURI()
           
 java.lang.String getPrefix()
           
 java.lang.String getQName()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlFileElement

public XmlFileElement(java.lang.String qName,
                      java.lang.String localName,
                      java.lang.String nsURI,
                      org.xml.sax.Attributes attrs)
Parameters:
qName - a possibly prefixed version of the XML element name, cannot be null
localName - local name of the element, cannot be null
nsURI - , can be null
attrs - an org.xml.sax.Attributes object
Method Detail

getQName

public java.lang.String getQName()
Returns:
the qname (=possibly prefixed) version of the XML element name

getPrefix

public java.lang.String getPrefix()
Returns:
the prefix part of the of the XML element qname

getLocalName

public java.lang.String getLocalName()
Returns:
the local part of the of the XML element qname

getNsURI

public java.lang.String getNsURI()
Returns:
the namespace URI of the of the XML element; null if namespace context is null

getAttributeValueQ

public java.lang.String getAttributeValueQ(java.lang.String qName)
Parameters:
qName - a possibly prefixed attribute name
Returns:
the attribute value if attribute qname exists, null otherwise

getAttributeValueL

public java.lang.String getAttributeValueL(java.lang.String localName)
Parameters:
localName - the local part of an attribute qname
Returns:
the attribute value if attribute localname exists, null otherwise

getAttributeValueNS

public java.lang.String getAttributeValueNS(java.lang.String nsURI,
                                            java.lang.String localName)
Parameters:
nsURI - the namespace URI of an attribute
localName - the local part of an attribute qname
Returns:
the attribute value if attribute localname exists, null otherwise