org.jboss.soa.esb.listeners.config
Interface XmlValidator

All Known Implementing Classes:
MockXmlValidatorImpl, XmlValidatorImpl

public interface XmlValidator

Interface for validating an xml given it's xsd or dtd.

Author:
kstam, ddegroff

Method Summary
 java.util.Collection<java.lang.String> getValidationResults()
          If the validation fails, more details can be obtained about the reasons why.
 org.w3c.dom.Document getXMLDocument()
          After validation the parsed document can be obtained for further processing.
 boolean validate(org.xml.sax.InputSource xmlInputSource)
          Validates an xml for it's wellformedness.
 boolean validate(org.xml.sax.InputSource xmlInputSource, javax.xml.transform.stream.StreamSource validationSource)
          Validates an xml using the xsd or dtd given in the second argument.
 

Method Detail

validate

boolean validate(org.xml.sax.InputSource xmlInputSource)
                 throws XmlValidatorException
Validates an xml for it's wellformedness.

Parameters:
xmlInputSource - of the xml that needs to be validated.
Returns:
boolean, true if it passed validation, false if it failed.
Throws:
XmlValidatorException

validate

boolean validate(org.xml.sax.InputSource xmlInputSource,
                 javax.xml.transform.stream.StreamSource validationSource)
                 throws XmlValidatorException
Validates an xml using the xsd or dtd given in the second argument.

Parameters:
xmlInputSource - of the xml that needs to be validated.
validationSource - to the xsd or dtd.
Returns:
boolean, true if it passed validation, false if it failed.
Throws:
XmlValidatorException

getValidationResults

java.util.Collection<java.lang.String> getValidationResults()
If the validation fails, more details can be obtained about the reasons why.

Returns:
Collection Strings

getXMLDocument

org.w3c.dom.Document getXMLDocument()
After validation the parsed document can be obtained for further processing.

Returns:
Document, the parsed XML Document.