Hitachi

uCosminexus Application Server XML Processor User Guide


C.2 Application functionality of XML Processor

The application functionality of XML Processor increases the convenience and maintainability by making the advanced and complex XML-related technology easily available.

The application functionality is implemented by using and integrating the basic functionality. Therefore, if the processing is simple, you can use the basic functionality instead of the application functionality.

For example, for a simple conversion processing such as renaming a specific element name in an XML document, you can implement the processing with the basic functionality of a parser such as a DOM parser, even if you do not use XSLT.

As a general tendency, the basic functionality has the advantage of a higher processing speed, but on the other hand, has the demerit that the basic functionality requires coding dependent on the XML document structure and that the coded code might be complicated. You must comprehensively determine which functionality is most appropriate for use based on the execution performance, memory performance, maintainability of the programs, and the features of the system and the data to be handled.

This subsection describes the application functionality of XML Processor.

Organization of this subsection

(1) XSLT functionality

The XSLT functionality converts an XML document into an XML document with a different structure, or into an HTML document or plain text.

The conversion rules are defined in an XML document called XSLT style sheet, so you need not code complicated conversion processing as programs, and the development and maintenance of programs becomes easy.

(2) XPath functionality

The XPath functionality uses the expression (XPath expression) that indicates a specific position in an XML document to extract specific parts from an XML document and acquire information related to the document content and document structure.

You can use a simple code to check whether a specific element or attribute exists in the XML document and to acquire a part of the XML document.

(3) Validation functionality

The Validation functionality makes the XML schema-based validation processing more efficient by converting the syntax rules defined in the XML schema into objects.

To use one XML schema document for multiple validation processing, if you use the basic functionality, the XML schema document is parsed to ensure that a syntax rule is generated for every parsing. If you use the Validation functionality, the syntax rules of the XML schema can be re-used as objects, so the schema document is parsed only once.

(4) JAXB functionality

The JAXB functionality is used to easily code the data exchange processing that reads the data included in an XML document into a Java class, and outputs the data from the Java class as an XML document.

This functionality, when used together with additional functionality that auto-generates an XML schema document from a Java class and a Java class from the XML schema, offers great flexibility in changing the data structure as well.