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) class
Inner-class to hold state -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new XMLInstance2SchemaHandlerXMLInstance2SchemaHandler
(Schema schema) Creates a new XMLInstance2SchemaHandler -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
void
endElement
(String name) void
error
(SAXParseException exception) void
fatalError
(SAXParseException exception) Returns the XML Schema object that is being used by this handlervoid
ignorableWhitespace
(char[] ch, int start, int length) void
processingInstruction
(String target, String data) protected void
setDefaultGroupOrder
(Order order) This method is used to set the default group type.void
setDocumentLocator
(Locator locator) void
void
startElement
(String name, AttributeList atts) void
warning
(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:
characters
in interfaceDocumentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceDocumentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceDocumentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceDocumentHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceDocumentHandler
-
startDocument
- Specified by:
startDocument
in interfaceDocumentHandler
- Throws:
SAXException
-
startElement
- Specified by:
startElement
in interfaceDocumentHandler
- Throws:
SAXException
-
error
- Specified by:
error
in interfaceErrorHandler
- Throws:
SAXException
-
fatalError
- Specified by:
fatalError
in interfaceErrorHandler
- Throws:
SAXException
-
warning
- Specified by:
warning
in interfaceErrorHandler
- Throws:
SAXException
-