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.
-
-
-
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 interfaceIDOMFactory
-
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 interfaceIDOMFactory
-
newCData
public CData newCData(java.lang.String text)
Description copied from interface:IDOMFactory
Creates a CData.- Specified by:
newCData
in interfaceIDOMFactory
-
newComment
public Comment newComment(java.lang.String text)
Description copied from interface:IDOMFactory
Creates a Comment.- Specified by:
newComment
in interfaceIDOMFactory
-
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 interfaceIDOMFactory
- Parameters:
elementName
- the root element's namepublicId
- the public Id; null for emptysystemId
- 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 interfaceIDOMFactory
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 interfaceIDOMFactory
-
newElement
public Element newElement(java.lang.String lname)
Description copied from interface:IDOMFactory
Creates an Element without namespace.- Specified by:
newElement
in interfaceIDOMFactory
-
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 interfaceIDOMFactory
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 interfaceIDOMFactory
- 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 interfaceIDOMFactory
-
-