org.apache.fop.util

## Class DOMBuilderContentHandlerFactory

- java.lang.Object
- - org.apache.fop.util.DOMBuilderContentHandlerFactory

- All Implemented Interfaces:
    ContentHandlerFactory

      public class DOMBuilderContentHandlerFactory
      extends Object
      implements ContentHandlerFactory

  ContentHandlerFactory which constructs ContentHandlers that build DOM Documents.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.fop.util.ContentHandlerFactory

      `ContentHandlerFactory.ObjectBuiltListener, ContentHandlerFactory.ObjectSource`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DOMBuilderContentHandlerFactory(String namespaceURI, DOMImplementation domImplementation)` Main Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ContentHandler` | `createContentHandler()`
    `String[]` | `getSupportedNamespaces()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DOMBuilderContentHandlerFactory

          public DOMBuilderContentHandlerFactory(String namespaceURI,
                                                 DOMImplementation domImplementation)

      Main Constructor
      Parameters:
        `namespaceURI` - the main namespace URI for the DOM to be parsed
        `domImplementation` - the DOMImplementation to use for build the DOM

  - ### Method Detail

    - #### getSupportedNamespaces

          public String[] getSupportedNamespaces()

      Specified by:
        `getSupportedNamespaces` in interface `ContentHandlerFactory`
      Returns:
        an array of supported namespaces.

    - #### createContentHandler

          public ContentHandler createContentHandler()
                                              throws SAXException

      Specified by:
        `createContentHandler` in interface `ContentHandlerFactory`
      Returns:
        a new ContentHandler to handle a SAX stream
      Throws:
        `SAXException` - if there's an error while preparing the ContentHandler

Copyright © 2025 Apache Software Foundation. All rights reserved.