public class StructureValidator extends DefaultHandler
| Constructor and Description |
|---|
StructureValidator()
Default Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
endElement(String uri,
String localName,
String qName)
Do nothing, just validating.
|
void |
error(SAXParseException exception)
Adds a warning message to the parse result message.
|
void |
fatalError(SAXParseException exception)
Adds a warning message to the parse result message.
|
String |
getParseResult() |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Do nothing, just validating.
|
static String |
validateStructure(String inputString,
String schemaURL)
Validates the given hmc.xml string.
|
void |
warning(SAXParseException exception)
Adds a warning message to the parse result message.
|
characters, endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDeclpublic static String validateStructure(String inputString, String schemaURL) throws IOException, ParserConfigurationException, SAXException
inputString - input stream representing the XML structure.IOException - if the inputString cannot be readParserConfigurationException - if the parser configuration is erroneousSAXException - if there is an error during xml parsingpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXExceptionpublic void endElement(String uri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class DefaultHandlerSAXExceptionpublic void error(SAXParseException exception) throws SAXException
error in interface ErrorHandlererror in class DefaultHandlerSAXExceptionpublic void fatalError(SAXParseException exception) throws SAXException
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerSAXExceptionpublic void warning(SAXParseException exception) throws SAXException
warning in interface ErrorHandlerwarning in class DefaultHandlerSAXExceptionpublic String getParseResult()
Copyright © 2017 SAP SE. All Rights Reserved.