All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oracle.xml.parser.v2.NodeFactory

java.lang.Object
   |
   +----oracle.xml.parser.v2.NodeFactory

public class NodeFactory
extends Object
implements Serializable
This class specifies methods to create various nodes of the DOM tree built during parsing. Applications can override these methods to create their own custom classes to be added to the DOM tree while parsing. Applications have to register their own NodeFactory using the XMLParser's setNodeFactory() method. If a null pointer is returned by these methods, then the node will not be added to the DOM tree.

See Also:
setNodeFactory

Constructor Index

 o NodeFactory()

Method Index

 o createAttribute(String, String)
Creates an attribute node with the specified tag, and text.
 o createCDATASection(String)
Creates a CDATA node with the specified text.
 o createComment(String)
Creates a comment node with the specified text.
 o createDocument()
Creates a document node.
 o createElement(String)
Creates an Element node with the specified tag.
 o createProcessingInstruction(String, String)
Creates a PI node with the specified tag, and text.
 o createTextNode(String)
Creates a text node with the specified text.

Constructors

 o NodeFactory
 public NodeFactory()

Methods

 o createElement
 public XMLElement createElement(String tag)
Creates an Element node with the specified tag.

Parameters:
tag - The name of the element.
Returns:
The created element.
 o createDocument
 public XMLDocument createDocument()
Creates a document node. This method cannot return a null pointer.

Returns:
The created element.
 o createTextNode
 public XMLText createTextNode(String text)
Creates a text node with the specified text.

Parameters:
text - The text associated with the node.
Returns:
The created text node.
 o createCDATASection
 public XMLCDATA createCDATASection(String text)
Creates a CDATA node with the specified text.

Parameters:
text - The text associated with the node.
Returns:
The created CDATA node.
 o createComment
 public XMLComment createComment(String text)
Creates a comment node with the specified text.

Parameters:
text - The text associated with the node.
Returns:
The created comment node.
 o createProcessingInstruction
 public XMLPI createProcessingInstruction(String tag,
                                          String text)
Creates a PI node with the specified tag, and text.

Parameters:
tag - The name of the node.
text - The text associated with the node.
Returns:
The created PI node.
 o createAttribute
 public XMLAttr createAttribute(String tag,
                                String text)
Creates an attribute node with the specified tag, and text.

Parameters:
tag - The name of the node.
text - The text associated with the node.
Returns:
The created attribute node.

All Packages  Class Hierarchy  This Package  Previous  Next  Index