Package org.zkoss.idom.input

## Class DefaultIDOMFactory

- java.lang.Object
- - org.zkoss.idom.input.DefaultIDOMFactory

- All Implemented Interfaces:
    `IDOMFactory`

      public class DefaultIDOMFactory
      extends java.lang.Object
      implements IDOMFactory

  The default iDOM factory.
  Author:
    tomyeh

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultIDOMFactory()` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Attribute` | `newAttribute​(java.lang.String lname, java.lang.String value)` | Creates an Attribute without namespace.
    `Attribute` | `newAttribute​(Namespace ns, java.lang.String lname, java.lang.String value)` | Creates an Attribute with namespace.
    `CData` | `newCData​(java.lang.String text)` | Creates a CData.
    `Comment` | `newComment​(java.lang.String text)` | Creates a Comment.
    `DocType` | `newDocType​(java.lang.String elementName, java.lang.String publicId, java.lang.String systemId)` | Creates a DocType.
    `Document` | `newDocument​(Element rootElement, DocType docType)` | Creates a Document.
    `Element` | `newElement​(java.lang.String lname)` | Creates an Element without namespace.
    `Element` | `newElement​(Namespace ns, java.lang.String lname)` | Creates an Element with a namespace.
    `EntityReference` | `newEntityRef​(java.lang.String name)` | Creates an EntityReference.
    `ProcessingInstruction` | `newProcessingInstruction​(java.lang.String target, java.lang.String data)` | Creates a processing instruction.
    `Text` | `newText​(java.lang.String text)` | Creates a Text.

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

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

- - ### Constructor Detail

    - #### DefaultIDOMFactory

          public DefaultIDOMFactory()

      Constructor.

  - ### Method Detail

    - #### newAttribute

          public Attribute newAttribute​(java.lang.String lname,
                                        java.lang.String value)

      Description copied from interface: `IDOMFactory`
      Creates an Attribute without namespace.
      Specified by:
        `newAttribute` in interface `IDOMFactory`

    - #### newAttribute

          public Attribute newAttribute​(Namespace ns,
                                        java.lang.String lname,
                                        java.lang.String value)

      Description copied from interface: `IDOMFactory`
      Creates an Attribute with namespace.
      Specified by:
        `newAttribute` in interface `IDOMFactory`

    - #### newCData

          public CData newCData​(java.lang.String text)

      Description copied from interface: `IDOMFactory`
      Creates a CData.
      Specified by:
        `newCData` in interface `IDOMFactory`

    - #### newComment

          public Comment newComment​(java.lang.String text)

      Description copied from interface: `IDOMFactory`
      Creates a Comment.
      Specified by:
        `newComment` in interface `IDOMFactory`

    - #### newDocType

          public DocType newDocType​(java.lang.String elementName,
                                    java.lang.String publicId,
                                    java.lang.String systemId)

      Description copied from interface: `IDOMFactory`
      Creates a DocType.
      Specified by:
        `newDocType` in interface `IDOMFactory`
      Parameters:
        `elementName` - the root element's name
        `publicId` - the public Id; null for empty
        `systemId` - the system Id; null for empty

    - #### newDocument

          public Document newDocument​(Element rootElement,
                                      DocType docType)

      Description copied from interface: `IDOMFactory`
      Creates a Document.
      Specified by:
        `newDocument` in interface `IDOMFactory`
        `docType` - the document type; null for not available

    - #### newElement

          public Element newElement​(Namespace ns,
                                    java.lang.String lname)

      Description copied from interface: `IDOMFactory`
      Creates an Element with a namespace.
      Specified by:
        `newElement` in interface `IDOMFactory`

    - #### newElement

          public Element newElement​(java.lang.String lname)

      Description copied from interface: `IDOMFactory`
      Creates an Element without namespace.
      Specified by:
        `newElement` in interface `IDOMFactory`

    - #### newProcessingInstruction

          public ProcessingInstruction newProcessingInstruction​(java.lang.String target,
                                                                java.lang.String data)

      Description copied from interface: `IDOMFactory`
      Creates a processing instruction.
      Specified by:
        `newProcessingInstruction` in interface `IDOMFactory`
        `data` - the raw data; null for empty

    - #### newEntityRef

          public EntityReference newEntityRef​(java.lang.String name)

      Description copied from interface: `IDOMFactory`
      Creates an EntityReference.
      Specified by:
        `newEntityRef` in interface `IDOMFactory`
      Parameters:
        `name` - the entity reference's name

    - #### newText

          public Text newText​(java.lang.String text)

      Description copied from interface: `IDOMFactory`
      Creates a Text.
      Specified by:
        `newText` in interface `IDOMFactory`