public final class VariantXMLParser extends VariantSAXHandler
It is not intended to be called directly. This parser is called by FilterVariantXMLSource
and that should be used to get variants from an XML file. This returns the schema
"http://www.mattunderscore.com/schema/negotiation.xsd".
Constructor and Description |
---|
VariantXMLParser() |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] chars,
int start,
int length) |
void |
endElement(String prefix,
String localName,
String qualifiedName) |
void |
error(SAXParseException exception) |
void |
fatalError(SAXParseException exception) |
Schema |
getSchema()
Return the schema that will be used by the BaseVariantXMLSource to verify the XML input.
|
List<Variant> |
getVariants()
Returns the variants created by the parser.
|
void |
startElement(String s,
String s1,
String elementName,
Attributes attributes) |
void |
warning(SAXParseException exception) |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
public void startElement(String s, String s1, String elementName, Attributes attributes) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String prefix, String localName, String qualifiedName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
SAXException
public void characters(char[] chars, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
public List<Variant> getVariants()
VariantSAXHandler
getVariants
in class VariantSAXHandler
public void error(SAXParseException exception) throws SAXParseException
error
in interface ErrorHandler
error
in class DefaultHandler
SAXParseException
public void fatalError(SAXParseException exception) throws SAXParseException
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXParseException
public void warning(SAXParseException exception) throws SAXParseException
warning
in interface ErrorHandler
warning
in class DefaultHandler
SAXParseException
public Schema getSchema() throws NoSchemaException
VariantSAXHandler
getSchema
in class VariantSAXHandler
NoSchemaException
- Exception thrown if no schema is availableCopyright © 2016. All Rights Reserved.