public class XMLFactoryImpl extends XMLFactory
singleton
Constructor and Description |
---|
XMLFactoryImpl()
Create a new instance of XMLFactory.
|
Modifier and Type | Method and Description |
---|---|
Attribute |
createAttribute(java.lang.String name,
java.lang.String value)
Create an attribute with the specified name and value.
|
Document |
createDocument()
Create a new empty document.
|
Element |
createElement()
Create an element with no name or value.
|
Element |
createElement(java.lang.String name)
Create an element with the specified name.
|
Element |
createElement(java.lang.String name,
java.lang.String namespace)
Create an element with the specified name and value.
|
Node |
createNode()
Create a node with no name or value.
|
Node |
createNode(java.lang.String name)
Create a node with the specified name.
|
XMLReader |
createReader()
Create an xml reader.
|
XMLReader |
createReader(java.io.InputStream inStream)
Create an xml reader.
|
XMLReader |
createReader(java.lang.String publicID,
java.lang.String systemID)
Create an XML reader.
|
XMLWriter |
createWriter()
Create an xml writer.
|
XMLWriter |
createWriter(java.io.OutputStream outStream)
Create an xml writer.
|
getInstance
public XMLReader createReader()
createReader
in class XMLFactory
public XMLReader createReader(java.io.InputStream inStream) throws java.lang.Exception
createReader
in class XMLFactory
inStream
- the input stream to create the reader from.java.lang.Exception
- any error.public XMLReader createReader(java.lang.String publicID, java.lang.String systemID) throws java.lang.Exception
createReader
in class XMLFactory
publicID
- the public ID which can be null.systemID
- the system ID which cannot be null.java.lang.Exception
- any error.public XMLWriter createWriter()
createWriter
in class XMLFactory
public XMLWriter createWriter(java.io.OutputStream outStream)
createWriter
in class XMLFactory
outStream
- the stream to write to.public Document createDocument() throws java.lang.Exception
createDocument
in class XMLFactory
java.lang.Exception
- any error.public Attribute createAttribute(java.lang.String name, java.lang.String value)
createAttribute
in class XMLFactory
name
- the attribute name.value
- the attribute value.public Node createNode()
createNode
in class XMLFactory
public Node createNode(java.lang.String name)
createNode
in class XMLFactory
name
- the node name.public Element createElement()
createElement
in class XMLFactory
public Element createElement(java.lang.String name)
createElement
in class XMLFactory
name
- the element name.public Element createElement(java.lang.String name, java.lang.String namespace)
createElement
in class XMLFactory
name
- the element name.namespace
- the namespace symbol.