|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) B32476-02 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.toplink.ox.XMLValidator
public class XMLValidator
Class used to validate XML. This is used to check if the XML created during a marshal operation would be valid XML before the marshal operation is performed.
Create an XMLValidator from an XMLContext.
Code Sample
XMLContext context = new XMLContext("mySessionName");
XMLValidator validator = context.createValidator();
The validateRoot method is used to validate objects which are mapped to global elements in a schema and which have a default root element specified in the TopLink project. The validate method is used to validate all other mapped objects.
XMLContext| Field Summary | |
|---|---|
static int |
DTD_VALIDATION |
static int |
NONVALIDATING |
static int |
SCHEMA_VALIDATION |
| Method Summary | |
|---|---|
org.xml.sax.ErrorHandler |
getErrorHandler()Get the error handler to be used during validation |
void |
setErrorHandler(org.xml.sax.ErrorHandler handler)Set the error handler to be used during validation |
boolean |
validate(java.lang.Object object)Validate the given object. |
boolean |
validateRoot(java.lang.Object rootObject)Validate the given root object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int NONVALIDATING
public static final int SCHEMA_VALIDATION
public static final int DTD_VALIDATION
| Method Detail |
|---|
public boolean validateRoot(java.lang.Object rootObject)
throws XMLMarshalException
rootObject - A single root object to validateXMLMarshalException
public boolean validate(java.lang.Object object)
throws XMLMarshalException
object - A single object to validateXMLMarshalExceptionpublic void setErrorHandler(org.xml.sax.ErrorHandler handler)
handler - the error handler to be used during validationpublic org.xml.sax.ErrorHandler getErrorHandler()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||