public class XMLBeansParser extends Object
String
or InputStream
.Constructor and Description |
---|
XMLBeansParser() |
Modifier and Type | Method and Description |
---|---|
static List<LaxValidationCase> |
getRegisteredLaxValidationCases()
Returns the list of currently registered
LaxValidationCase s |
static org.apache.xmlbeans.XmlObject |
parse(InputStream resourceAsStream) |
static org.apache.xmlbeans.XmlObject |
parse(InputStream resourceAsStream,
boolean validate) |
static org.apache.xmlbeans.XmlObject |
parse(Node xmlnode)
Reads the given source.
|
static org.apache.xmlbeans.XmlObject |
parse(Node xmlnode,
boolean validate)
Reads the given source.
|
static org.apache.xmlbeans.XmlObject |
parse(String source)
Reads the given source.
|
static org.apache.xmlbeans.XmlObject |
parse(String source,
boolean validate)
Reads the given source.
|
static void |
registerLaxValidationCase(LaxValidationCase lvc)
Register a new
LaxValidationCase which should
let pass corresponding "invalid" documents. |
static void |
setValidationGloballyEnabled(boolean validateGlobally)
Use this method to set the state of the validation flag.
|
void |
sosValidateExample(org.apache.xmlbeans.XmlObject xb_doc) |
static void |
strictValidate(org.apache.xmlbeans.XmlObject doc)
Validates an xml doc.
|
static Collection<org.apache.xmlbeans.XmlError> |
validate(org.apache.xmlbeans.XmlObject doc)
Validates an xml doc.
|
public static void setValidationGloballyEnabled(boolean validateGlobally)
validateGlobally
- public static void registerLaxValidationCase(LaxValidationCase lvc)
LaxValidationCase
which should
let pass corresponding "invalid" documents.lvc
- a new lax casepublic static List<LaxValidationCase> getRegisteredLaxValidationCases()
LaxValidationCase
sLaxValidationCase
spublic static org.apache.xmlbeans.XmlObject parse(String source) throws XMLHandlingException
source
- The xml source.XMLHandlingException
- thrown if the XML is incorrectpublic static org.apache.xmlbeans.XmlObject parse(String source, boolean validate) throws XMLHandlingException
source
- The xml source.validate
- Validate the source?XMLHandlingException
- thrown if the XML is incorrectpublic static org.apache.xmlbeans.XmlObject parse(InputStream resourceAsStream) throws XMLHandlingException
resourceAsStream
- the xml source as streamXMLHandlingException
- thrown if the XML is incorrectpublic static org.apache.xmlbeans.XmlObject parse(InputStream resourceAsStream, boolean validate) throws XMLHandlingException
resourceAsStream
- The source as a stream.validate
- Validate the source?XMLHandlingException
- thrown if the XML is incorrectpublic static org.apache.xmlbeans.XmlObject parse(Node xmlnode) throws XMLHandlingException
xmlnode
- The xml source.XMLHandlingException
- thrown if the XML is incorrectpublic static org.apache.xmlbeans.XmlObject parse(Node xmlnode, boolean validate) throws XMLHandlingException
xmlnode
- The xml source.validate
- Validate the source?XMLHandlingException
- thrown if the XML is incorrectpublic static void strictValidate(org.apache.xmlbeans.XmlObject doc) throws XMLHandlingException
doc
- the document to validateXMLHandlingException
- thrown if the XML is incorrectpublic static Collection<org.apache.xmlbeans.XmlError> validate(org.apache.xmlbeans.XmlObject doc)
doc
- the document to validatepublic void sosValidateExample(org.apache.xmlbeans.XmlObject xb_doc) throws OwsExceptionReport
OwsExceptionReport
Copyright © 2012–2017 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.