org.jscience.ml.cml
Interface CMLDocumentFactory

All Known Implementing Classes:
DocumentFactoryImpl

public interface CMLDocumentFactory

Creates DocumentFactory of appropriate subclass


Method Summary
 AbstractCMLDocument createDocument()
          create document with current documentClassName
 AbstractCMLDocument parseSAX(org.xml.sax.InputSource is)
          as above but debug is false
 org.w3c.dom.Element parseSAX(org.xml.sax.InputSource is, AbstractCMLDocument doc)
          parses XML document into existing DOM The new document must be well-formed with a single root element the application will probably wish to relocate this in the DOM. debug is set to false
 org.w3c.dom.Element parseSAX(org.xml.sax.InputSource is, AbstractCMLDocument doc, boolean debug)
          parses XML document into existing DOM The new document must be well-formewd with a single root element the application will probably wish to relocate this in the DOM.
 AbstractCMLDocument parseSAX(org.xml.sax.InputSource is, boolean debug)
          parses XML document into DOM, creating a new ownerDocument
 AbstractCMLDocument parseString(java.lang.String xmlString)
          convenience method; parses a string representing a well-formed XML document
 void setDocumentClassName(java.lang.String documentClassName)
          set the document class name
 

Method Detail

setDocumentClassName

void setDocumentClassName(java.lang.String documentClassName)
set the document class name

Parameters:
documentClassName - the classname with which to create new Documents

createDocument

AbstractCMLDocument createDocument()
create document with current documentClassName

Returns:
AbstractCMLDocument the document

parseString

AbstractCMLDocument parseString(java.lang.String xmlString)
                                throws CMLException
convenience method; parses a string representing a well-formed XML document

Parameters:
xmlString - the string
Returns:
Element
Throws:
CMLException

parseSAX

org.w3c.dom.Element parseSAX(org.xml.sax.InputSource is,
                             AbstractCMLDocument doc,
                             boolean debug)
                             throws java.io.IOException,
                                    CMLException
parses XML document into existing DOM The new document must be well-formewd with a single root element the application will probably wish to relocate this in the DOM.

Parameters:
is - the input
doc - the existing document
debug -
Returns:
Element element formed by parsing NOT attached to tree
Throws:
java.io.IOException - specific or IO
CMLException

parseSAX

org.w3c.dom.Element parseSAX(org.xml.sax.InputSource is,
                             AbstractCMLDocument doc)
                             throws java.io.IOException,
                                    CMLException
parses XML document into existing DOM The new document must be well-formed with a single root element the application will probably wish to relocate this in the DOM. debug is set to false

Parameters:
is - - the input
doc - - the existing document
Returns:
Element - element formed by parsing NOT attached to tree
Throws:
java.io.IOException - - domain or IO
CMLException

parseSAX

AbstractCMLDocument parseSAX(org.xml.sax.InputSource is,
                             boolean debug)
                             throws java.io.IOException,
                                    CMLException
parses XML document into DOM, creating a new ownerDocument

Parameters:
is - - the input
debug -
Returns:
DOCUMENT ME!
Throws:
java.io.IOException - - domain or IO
CMLException

parseSAX

AbstractCMLDocument parseSAX(org.xml.sax.InputSource is)
                             throws java.io.IOException,
                                    CMLException
as above but debug is false

Parameters:
is - - the input
Returns:
DOCUMENT ME!
Throws:
java.io.IOException - - domain or IO
CMLException