org.merlotxml.util.xml
Interface DOMLiaison

All Known Subinterfaces:
ValidDOMLiaison
All Known Implementing Classes:
DOMLiaison

public interface DOMLiaison

DOM Liaison This interface makes up for deficiencies in the DOM API. It allows you to plug in different XML libraries by creating implementations of this interface.

Author:
Tim McCune

Method Summary
 void addEntityResolver(org.xml.sax.EntityResolver er)
           
 org.w3c.dom.Document createDocument()
          Create a Document
 org.w3c.dom.Document parseXMLStream(java.io.InputStream is)
          Deprecated. Use parseXMLStream(Reader)
 org.w3c.dom.Document parseXMLStream(java.io.Reader in)
           
 void print(org.w3c.dom.Document doc, java.io.Writer output, java.lang.String resultns, boolean format)
          Print a Document
 void setProperties(java.util.Properties props)
           
 

Method Detail

createDocument

public org.w3c.dom.Document createDocument()
Create a Document

Returns:
An empty Document

print

public void print(org.w3c.dom.Document doc,
                  java.io.Writer output,
                  java.lang.String resultns,
                  boolean format)
           throws DOMLiaisonImplException
Print a Document

Parameters:
doc - The Document to print
output - Writer to send the output to
resultns - Result name space for the output. Used for things like HTML hacks.
format - If true, output will be nicely tab-formatted. If false, there shouldn't be any line breaks or tabs between elements in the output. Sometimes setting this to false is necessary to get your HTML to work right.
Throws:
DOMLiaisonImplException - Wrapper exception that is thrown if the implementing class throws any kind of exception.

parseXMLStream

public org.w3c.dom.Document parseXMLStream(java.io.InputStream is)
                                    throws DOMLiaisonImplException
Deprecated. Use parseXMLStream(Reader)

Parse a stream of XML into a Document

Returns:
The Document that was parsed
Throws:
DOMLiaisonImplException - Wrapper exception that is thrown if the implementing class throws any kind of exception.

parseXMLStream

public org.w3c.dom.Document parseXMLStream(java.io.Reader in)
                                    throws DOMLiaisonImplException
Throws:
DOMLiaisonImplException

setProperties

public void setProperties(java.util.Properties props)

addEntityResolver

public void addEntityResolver(org.xml.sax.EntityResolver er)