Package nu.validator.saxtree
Class Element
- java.lang.Object
-
- nu.validator.saxtree.Node
-
- nu.validator.saxtree.ParentNode
-
- nu.validator.saxtree.Element
-
- All Implemented Interfaces:
org.xml.sax.Locator
public final class Element extends ParentNode
An element.- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private org.xml.sax.Attributes
attributes
The attributes.private java.lang.String
localName
The local name.private java.util.List<PrefixMapping>
prefixMappings
The namespace prefix mappings.private java.lang.String
qName
The qualified name.private java.lang.String
uri
The namespace URI.-
Fields inherited from class nu.validator.saxtree.ParentNode
endLocator
-
-
Constructor Summary
Constructors Constructor Description Element(org.xml.sax.Locator locator, java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts, boolean retainAttributes, java.util.List<PrefixMapping> prefixMappings)
The contructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.Attributes
getAttributes()
Returns the attributes.java.lang.String
getLocalName()
Returns the localName.NodeType
getNodeType()
Return the node type.java.util.List<PrefixMapping>
getPrefixMappings()
Returns the prefixMappings.java.lang.String
getQName()
Returns the qName.java.lang.String
getUri()
Returns the uri.(package private) void
revisit(TreeParser treeParser)
Revisit the node.(package private) void
visit(TreeParser treeParser)
Visit the node.-
Methods inherited from class nu.validator.saxtree.ParentNode
appendChild, appendChildren, copyEndLocator, getFirstChild, getLastChild, insertBefore, insertBetween, removeChild, setEndLocator
-
Methods inherited from class nu.validator.saxtree.Node
detach, getColumnNumber, getData, getLineNumber, getName, getNextSibling, getParentNode, getPreviousSibling, getPublicId, getPublicIdentifier, getSystemId, getSystemIdentifier, getTarget, setNextSibling, setParentNode
-
-
-
-
Field Detail
-
uri
private final java.lang.String uri
The namespace URI.
-
localName
private final java.lang.String localName
The local name.
-
qName
private final java.lang.String qName
The qualified name.
-
attributes
private final org.xml.sax.Attributes attributes
The attributes.
-
prefixMappings
private final java.util.List<PrefixMapping> prefixMappings
The namespace prefix mappings.
-
-
Constructor Detail
-
Element
public Element(org.xml.sax.Locator locator, java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts, boolean retainAttributes, java.util.List<PrefixMapping> prefixMappings)
The contructor.- Parameters:
locator
- the locator.uri
- the namespace URIlocalName
- the local nameqName
- the qualified nameatts
- the attributesretainAttributes
-true
to retain the attributes instead of copyingprefixMappings
- the prefix mappings
-
-
Method Detail
-
visit
void visit(TreeParser treeParser) throws org.xml.sax.SAXException
Description copied from class:Node
Visit the node.- Specified by:
visit
in classNode
- Parameters:
treeParser
- the visitor- Throws:
org.xml.sax.SAXException
- if stuff goes wrong- See Also:
Node.visit(nu.validator.saxtree.TreeParser)
-
revisit
void revisit(TreeParser treeParser) throws org.xml.sax.SAXException
Description copied from class:Node
Revisit the node.- Overrides:
revisit
in classNode
- Parameters:
treeParser
- the visitor- Throws:
org.xml.sax.SAXException
- if stuff goes wrong- See Also:
Node.revisit(nu.validator.saxtree.TreeParser)
-
getAttributes
public org.xml.sax.Attributes getAttributes()
Returns the attributes.- Overrides:
getAttributes
in classNode
- Returns:
- the attributes
-
getLocalName
public java.lang.String getLocalName()
Returns the localName.- Overrides:
getLocalName
in classNode
- Returns:
- the localName
-
getPrefixMappings
public java.util.List<PrefixMapping> getPrefixMappings()
Returns the prefixMappings.- Overrides:
getPrefixMappings
in classNode
- Returns:
- the prefixMappings
-
getQName
public java.lang.String getQName()
Returns the qName.
-
getUri
public java.lang.String getUri()
Returns the uri.
-
getNodeType
public NodeType getNodeType()
Description copied from class:Node
Return the node type.- Specified by:
getNodeType
in classNode
- Returns:
- the node type
- See Also:
Node.getNodeType()
-
-