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
-
NodeFactory()
-
-
createAttribute(String, String)
- Creates an attribute node with the specified tag, and text.
-
createCDATASection(String)
- Creates a CDATA node with the specified text.
-
createComment(String)
- Creates a comment node with the specified text.
-
createDocument()
- Creates a document node.
-
createElement(String)
- Creates an Element node with the specified tag.
-
createProcessingInstruction(String, String)
- Creates a PI node with the specified tag, and text.
-
createTextNode(String)
- Creates a text node with the specified text.
NodeFactory
public NodeFactory()
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.
createDocument
public XMLDocument createDocument()
- Creates a document node. This method cannot return a null pointer.
- Returns:
- The created element.
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.
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.
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.
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.
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