fi.hut.tml.xsmiles.xml
Interface XMLParser

All Known Implementing Classes:
JaxpXMLParser, XercesXMLParser

public interface XMLParser

Contains the DOM-implementation used by the current configuration.


Method Summary
 org.w3c.dom.Document createEmptyDocument()
           
 org.xml.sax.SAXParseException getLastParseException()
           
 org.w3c.dom.Document openDocument(java.io.InputStream sourceStream, boolean presentationDOM)
           
 org.w3c.dom.Document openDocument(java.io.InputStream sourceStream, boolean presentationDOM, java.lang.String documentURL)
          Reads a document from an InputStream into a DOM tree.
 org.w3c.dom.Document openDocument(java.io.Reader sourceReader, boolean presentationDOM)
          Reads an document to DOM tree
 org.w3c.dom.Document openDocument(java.net.URL url)
           
 org.w3c.dom.Document openDocument(java.net.URL url, java.lang.String documentClassname)
           
 java.lang.String write(org.w3c.dom.Node node)
           
 java.lang.String write(org.w3c.dom.Node node, boolean prettyPrinting)
           
 void write(java.io.Writer writer, org.w3c.dom.Node node, boolean prettyPrinting)
           
 void writeWithoutXMLDecl(java.io.Writer writer, org.w3c.dom.Node node)
           
 

Method Detail

openDocument

public org.w3c.dom.Document openDocument(java.io.Reader sourceReader,
                                         boolean presentationDOM)
                                  throws java.io.IOException,
                                         org.xml.sax.SAXException
Reads an document to DOM tree

Returns:
read DOM document.
Throws:
java.io.IOException
org.xml.sax.SAXException

openDocument

public org.w3c.dom.Document openDocument(java.io.InputStream sourceStream,
                                         boolean presentationDOM,
                                         java.lang.String documentURL)
                                  throws java.io.IOException,
                                         org.xml.sax.SAXException
Reads a document from an InputStream into a DOM tree. This method was added for i18n. A parser assumes that a Reader source is already in Unicode, whereas it will check the xml header for the encoding of an InputStream.

Returns:
the read in DOM document
Throws:
java.io.IOException
org.xml.sax.SAXException

openDocument

public org.w3c.dom.Document openDocument(java.net.URL url)
                                  throws java.io.IOException,
                                         org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

openDocument

public org.w3c.dom.Document openDocument(java.net.URL url,
                                         java.lang.String documentClassname)
                                  throws java.io.IOException,
                                         org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

createEmptyDocument

public org.w3c.dom.Document createEmptyDocument()

write

public java.lang.String write(org.w3c.dom.Node node)

write

public java.lang.String write(org.w3c.dom.Node node,
                              boolean prettyPrinting)

write

public void write(java.io.Writer writer,
                  org.w3c.dom.Node node,
                  boolean prettyPrinting)
           throws java.io.IOException
Throws:
java.io.IOException

writeWithoutXMLDecl

public void writeWithoutXMLDecl(java.io.Writer writer,
                                org.w3c.dom.Node node)
                         throws java.io.IOException
Throws:
java.io.IOException

getLastParseException

public org.xml.sax.SAXParseException getLastParseException()

openDocument

public org.w3c.dom.Document openDocument(java.io.InputStream sourceStream,
                                         boolean presentationDOM)
                                  throws java.io.IOException,
                                         org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException


X-Smiles 1.2