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 AttributenewAttribute(java.lang.String lname, java.lang.String value)Creates an Attribute without namespace.AttributenewAttribute(Namespace ns, java.lang.String lname, java.lang.String value)Creates an Attribute with namespace.CDatanewCData(java.lang.String text)Creates a CData.CommentnewComment(java.lang.String text)Creates a Comment.DocTypenewDocType(java.lang.String elementName, java.lang.String publicId, java.lang.String systemId)Creates a DocType.DocumentnewDocument(Element rootElement, DocType docType)Creates a Document.ElementnewElement(java.lang.String lname)Creates an Element without namespace.ElementnewElement(Namespace ns, java.lang.String lname)Creates an Element with a namespace.EntityReferencenewEntityRef(java.lang.String name)Creates an EntityReference.ProcessingInstructionnewProcessingInstruction(java.lang.String target, java.lang.String data)Creates a processing instruction.TextnewText(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:IDOMFactoryCreates an Attribute without namespace.- Specified by:
newAttributein interfaceIDOMFactory
-
newAttribute
public Attribute newAttribute(Namespace ns, java.lang.String lname, java.lang.String value)
Description copied from interface:IDOMFactoryCreates an Attribute with namespace.- Specified by:
newAttributein interfaceIDOMFactory
-
newCData
public CData newCData(java.lang.String text)
Description copied from interface:IDOMFactoryCreates a CData.- Specified by:
newCDatain interfaceIDOMFactory
-
newComment
public Comment newComment(java.lang.String text)
Description copied from interface:IDOMFactoryCreates a Comment.- Specified by:
newCommentin interfaceIDOMFactory
-
newDocType
public DocType newDocType(java.lang.String elementName, java.lang.String publicId, java.lang.String systemId)
Description copied from interface:IDOMFactoryCreates a DocType.- Specified by:
newDocTypein 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:IDOMFactoryCreates a Document.- Specified by:
newDocumentin interfaceIDOMFactorydocType- the document type; null for not available
-
newElement
public Element newElement(Namespace ns, java.lang.String lname)
Description copied from interface:IDOMFactoryCreates an Element with a namespace.- Specified by:
newElementin interfaceIDOMFactory
-
newElement
public Element newElement(java.lang.String lname)
Description copied from interface:IDOMFactoryCreates an Element without namespace.- Specified by:
newElementin interfaceIDOMFactory
-
newProcessingInstruction
public ProcessingInstruction newProcessingInstruction(java.lang.String target, java.lang.String data)
Description copied from interface:IDOMFactoryCreates a processing instruction.- Specified by:
newProcessingInstructionin interfaceIDOMFactorydata- the raw data; null for empty
-
newEntityRef
public EntityReference newEntityRef(java.lang.String name)
Description copied from interface:IDOMFactoryCreates an EntityReference.- Specified by:
newEntityRefin interfaceIDOMFactory- Parameters:
name- the entity reference's name
-
newText
public Text newText(java.lang.String text)
Description copied from interface:IDOMFactoryCreates a Text.- Specified by:
newTextin interfaceIDOMFactory
-
-