Package org.geotools.xsd.impl
Interface ElementHandler
-
- All Superinterfaces:
Handler
- All Known Implementing Classes:
DelegatingHandler
,ElementHandlerImpl
public interface ElementHandler extends Handler
Classes implementing this interface serve has handlers for elements in an instance document as it is parsed. The element handler interface is a subset of theContentHandler
interface.The methods
startElement, characters, and endElement
are called in sequence as they are for normal sax content handlers.An element handler corresponds to a specific element in a schema. A handler must return a child handler for each valid child element of its corresponding element.
- Author:
- Justin Deoliveira,Refractions Research Inc.,jdeolive@refractions.net
- See Also:
ContentHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
Callback when characters of an element are encountered.void
endElement(QName qName)
Callback on trailing edge of element.XSDElementDeclaration
getElementDeclaration()
void
startElement(QName qName, Attributes attributes)
Callback on leading edge of an element.-
Methods inherited from interface Handler
createChildHandler, endChildHandler, endPrefixMapping, getComponent, getContext, getParentHandler, getParseNode, getSchemaContent, setContext, startChildHandler, startPrefixMapping
-
-
-
-
Method Detail
-
startElement
void startElement(QName qName, Attributes attributes) throws SAXException
Callback on leading edge of an element.- Parameters:
qName
- The qualified name of the element being handled.attributes
- The attributes of hte elmenent being handled.- Throws:
SAXException
- Any xml errors that occur.- See Also:
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
-
characters
void characters(char[] ch, int start, int length) throws SAXException
Callback when characters of an element are encountered.- Parameters:
ch
- Array containing characters.start
- The starting index of the characters.length
- The number of characters.- Throws:
SAXException
- Any xml errors.- See Also:
ContentHandler.characters(char[], int, int)
-
endElement
void endElement(QName qName) throws SAXException
Callback on trailing edge of element.- Parameters:
qName
- The qualified name of the element being handled.- Throws:
SAXException
- Any xml errors.- See Also:
ContentHandler.endElement(java.lang.String, java.lang.String, java.lang.String)
-
getElementDeclaration
XSDElementDeclaration getElementDeclaration()
- Returns:
- The declaration of hte element being handled.
-
-