Project: bml_lib

License: BSD

Dependencies:

Used by:

All Packages

edu::wpi::hri::bml::XMLInterface Class Reference

List of all members.

Public Member Functions

String convertDocumentToString (Document doc)
Document createDocument ()
Document loadDocument (Reader reader)
 XMLInterface (Logger logger, File schema)

Private Attributes

final DocumentBuilderFactory dbFact
final Logger logger
final TransformerFactory transFact

Detailed Description

The xml interface is used for creating templates, documents, and other xml or xslt objects. This object uses the built in java xml parsers as the source of the objects and factories that are being used. This is to ensure that at least xslt 1.0 specification is used.

Author:
Aaron Holroyd (aholroyd (at) wpi (dot) edu)

Definition at line 63 of file XMLInterface.java.


Constructor & Destructor Documentation

edu::wpi::hri::bml::XMLInterface::XMLInterface ( Logger  logger,
File  schema 
) [inline]

Create a new interface to the xml parsers and transformers.

Parameters:
logger The logger to use if an exception occurs.
schema The file to parse to use as a schema

Definition at line 77 of file XMLInterface.java.


Member Function Documentation

String edu::wpi::hri::bml::XMLInterface::convertDocumentToString ( Document  doc  )  [inline]

Convert a DOM document to a string. This method uses built in transformers to format the document into a string based on the settings of that document.

Parameters:
doc The document to convert to a string.
Returns:
The String representation of the xml in the document.

Definition at line 146 of file XMLInterface.java.

Document edu::wpi::hri::bml::XMLInterface::createDocument (  )  [inline]

Create an empty document that elements and all other types of xml can be added to. This document type is guaranteed to be compatible with all other methods in the XMLInterface. Generating a document on your own may not work with this object.

Returns:
The newly created document.

Definition at line 127 of file XMLInterface.java.

Document edu::wpi::hri::bml::XMLInterface::loadDocument ( Reader  reader  )  [inline]

Load a document from an xml source. This is used for parsing strings of xml or xslt. As such the loadTemplate() method uses this as a base to parse for the template.

Parameters:
reader The reader containing the xml text.
Returns:
The Document as created from the reader.

Definition at line 106 of file XMLInterface.java.


Member Data Documentation

final DocumentBuilderFactory edu::wpi::hri::bml::XMLInterface::dbFact [private]

Definition at line 67 of file XMLInterface.java.

Definition at line 65 of file XMLInterface.java.

final TransformerFactory edu::wpi::hri::bml::XMLInterface::transFact [private]

Definition at line 66 of file XMLInterface.java.


The documentation for this class was generated from the following file:

bml_lib
Author(s): Aaron Holroyd (aholroyd (at) wpi (dot) edu)
autogenerated on Fri Sep 9 10:44:08 2011