org.cdmckay.coffeedom.output
Class DOMOutputter

java.lang.Object
  extended by org.cdmckay.coffeedom.output.DOMOutputter

public class DOMOutputter
extends Object

Outputs a CoffeeDOM Document as a DOM org.w3c.dom.Document.

Author:
Brett McLaughlin, Jason Hunter, Matthew Merlo, Dan Schaffer, Yusuf Goolamabbas, Bradley S. Huffman

Constructor Summary
DOMOutputter()
          This creates a new DOMOutputter which will attempt to first locate a DOM implementation to use via JAXP, and if JAXP does not exist or there's a problem, will fall back to the default parser.
DOMOutputter(String adapterClassName)
          This creates a new DOMOutputter using the specified DOMAdapter implementation as a way to choose the underlying parser.
 
Method Summary
 boolean getForceNamespaceAware()
          Returns whether DOMs will be constructed with namespaces even when the source document has elements all in the empty namespace.
 Document output(Document document)
          This converts the CoffeeDOM Document parameter to a DOM Document, returning the DOM version.
 void setForceNamespaceAware(boolean flag)
          Controls how NO_NAMESPACE nodes are handeled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMOutputter

public DOMOutputter()
This creates a new DOMOutputter which will attempt to first locate a DOM implementation to use via JAXP, and if JAXP does not exist or there's a problem, will fall back to the default parser.


DOMOutputter

public DOMOutputter(String adapterClassName)
This creates a new DOMOutputter using the specified DOMAdapter implementation as a way to choose the underlying parser.

Parameters:
adapterClassName - String name of class to use for DOM output
Method Detail

setForceNamespaceAware

public void setForceNamespaceAware(boolean flag)
Controls how NO_NAMESPACE nodes are handeled. If true the outputter always creates a namespace aware DOM.

Parameters:
flag -

getForceNamespaceAware

public boolean getForceNamespaceAware()
Returns whether DOMs will be constructed with namespaces even when the source document has elements all in the empty namespace.

Returns:
the forceNamespaceAware flag value

output

public Document output(Document document)
                throws CoffeeDOMException
This converts the CoffeeDOM Document parameter to a DOM Document, returning the DOM version. The DOM implementation is the one chosen in the constructor.

Parameters:
document - Document to output.
Returns:
an org.w3c.dom.Document version
Throws:
CoffeeDOMException


Copyright © 2011. All Rights Reserved.