Class XMLInstance2SchemaHandler
java.lang.Object
org.exolab.castor.xml.schema.util.XMLInstance2SchemaHandler
- All Implemented Interfaces:
DocumentHandler,ErrorHandler
public final class XMLInstance2SchemaHandler
extends Object
implements DocumentHandler, ErrorHandler
A Utility class which will attempt to create an XML Schema
Object Model based on a given XML instance document.
- Version:
- $Revision: 7996 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Keith Visco
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classInner-class to hold state -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new XMLInstance2SchemaHandlerXMLInstance2SchemaHandler(Schema schema) Creates a new XMLInstance2SchemaHandler -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String name) voiderror(SAXParseException exception) voidfatalError(SAXParseException exception) Returns the XML Schema object that is being used by this handlervoidignorableWhitespace(char[] ch, int start, int length) voidprocessingInstruction(String target, String data) protected voidsetDefaultGroupOrder(Order order) This method is used to set the default group type.voidsetDocumentLocator(Locator locator) voidvoidstartElement(String name, AttributeList atts) voidwarning(SAXParseException exception)
-
Constructor Details
-
XMLInstance2SchemaHandler
public XMLInstance2SchemaHandler()Creates a new XMLInstance2SchemaHandler -
XMLInstance2SchemaHandler
Creates a new XMLInstance2SchemaHandler
-
-
Method Details
-
getSchema
Returns the XML Schema object that is being used by this handler- Returns:
- the XML Schema object that is being used by this handler
-
setDefaultGroupOrder
This method is used to set the default group type. Either "sequence" or "all". The default is "sequence".- Parameters:
order- the default group order to use.
-
characters
- Specified by:
charactersin interfaceDocumentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceDocumentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceDocumentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceDocumentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceDocumentHandler- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceDocumentHandler
-
startDocument
- Specified by:
startDocumentin interfaceDocumentHandler- Throws:
SAXException
-
startElement
- Specified by:
startElementin interfaceDocumentHandler- Throws:
SAXException
-
error
- Specified by:
errorin interfaceErrorHandler- Throws:
SAXException
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXException
-
warning
- Specified by:
warningin interfaceErrorHandler- Throws:
SAXException
-