com.bea.xml
Class XmlUtils

java.lang.Object
  extended by com.bea.xml.XmlUtils

public abstract class XmlUtils
extends Object

Class providing some Utils for Xml Objects.


Method Summary
static XmlUtils newInstance()
          returns a new implementation instance
abstract  boolean validate(org.apache.xmlbeans.XmlObject xmlObject, String systemId, EntityResolver resolver)
          Schema validates an XmlObject using the given EntityResolver to find the schema.
The schema is resolved by system id.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static XmlUtils newInstance()
                            throws XmlUtilsException
returns a new implementation instance

Returns:
An instance of XmlUtils.
Throws:
org.apache.xmlbeans.XmlUtilsException - if the instance cannot be created.
XmlUtilsException

validate

public abstract boolean validate(org.apache.xmlbeans.XmlObject xmlObject,
                                 String systemId,
                                 EntityResolver resolver)
                          throws XmlUtilsException
Schema validates an XmlObject using the given EntityResolver to find the schema.
The schema is resolved by system id. The system id can be specified either as parameter or using the xsi:schemaLocation or xsi:noNamespaceSchemaLocation attribute.

Parameters:
xmlObject - The XML instance to validate
systemId - Expected system id. The system id must be present if the xml document does not specify an xsi:schemaLocation or xsi:noNamespaceSchemaLocation
resolver - The entity resolver used to get the schema.
Throws:
NullPointerException - if the xmlObject or resolver is null
org.apache.xmlbeans.XmlUtilsException - thrown if an exception occurs trying to validate. See XmlUtilsException for error codes.
XmlUtilsException