Using XML Schema Components

Use XML Schema components for parsing, validating, manipulating and generating typed XML documents.

Loading XML documents

To create a typed XML object from an XML string use method load().

To create a typed XML object from an external XML file use method loadFromUrl(). This method supports file:// and http:// protocols.

You can also work with the Fuego.Xml.XMLObject component directly, although it doesn't provide any type information or validation.

Loading malformed documents causes a runtime Exception.

Validating an XSD component

When an XSD component loads an XML document (methods load, loadFromUrl) it does not validate the document against the schema. The component ignores unknown XML elements and attributes when loading, but these are not discarded: generating an XML string representation (with generateXmlFor()) includes the original elements and attributes.

To validate a loaded document, use the validate() method. If validation fails, this method raises a runtime Exception.

Converting XSD components to XML strings

All cataloged XSD components provide method generateXmlFor (inherited from Fuego.Xml.XMLObject). This method serializes the current XMLObject to an XML String representation according to the XML-Schema 1.1 specification.

XSD Components on runtime

The XML Schema Definition documents (*.xsd) are not needed on runtime. Oracle BPM does not use the XSD file once its been cataloged.