Interface CMLDocumentFactory
- All Known Implementing Classes:
DocumentFactoryImpl
public interface CMLDocumentFactory
Creates DocumentFactory of appropriate subclass
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptioncreate document with current documentClassNameparseSAX(InputSource is) Parses an XML document into the DOM, creating a new owner document (debug is false).parseSAX(InputSource is, boolean debug) Parses an XML document into the DOM, creating a new owner document.parseSAX(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 falseparseSAX(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.parseString(String xmlString) convenience method; parses a string representing a well-formed XML documentvoidsetDocumentClassName(String documentClassName) set the document class name
-
Method Details
-
setDocumentClassName
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
convenience method; parses a string representing a well-formed XML document- Parameters:
xmlString- the string- Returns:
- Element
- Throws:
CMLException
-
parseSAX
Element parseSAX(InputSource is, AbstractCMLDocument doc, boolean debug) throws 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 inputdoc- the existing documentdebug-- Returns:
- Element element formed by parsing NOT attached to tree
- Throws:
IOException- specific or IOCMLException
-
parseSAX
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 inputdoc- - the existing document- Returns:
- Element - element formed by parsing NOT attached to tree
- Throws:
IOException- - domain or IOCMLException
-
parseSAX
Parses an XML document into the DOM, creating a new owner document.- Parameters:
is- the input sourcedebug- whether to enable debugging- Returns:
- the parsed CML document
- Throws:
IOException- if an I/O error occursCMLException- if a CML-specific error occurs
-
parseSAX
Parses an XML document into the DOM, creating a new owner document (debug is false).- Parameters:
is- the input source- Returns:
- the parsed CML document
- Throws:
IOException- if an I/O error occursCMLException- if a CML-specific error occurs
-