Xerces 3.1.1

com.ibm.xml.parsers
Class NonValidatingDOMParser

java.lang.Object
  |
  +--com.ibm.xml.parsers.NonValidatingDOMParser
Direct Known Subclasses:
DOMParser

Deprecated. The W3C's DOM L3 working group will specify a standardized API for parser instantiation. XML4J and Xerces will switch to this API when it becomes available

public class NonValidatingDOMParser
extends java.lang.Object

NonValidatingDOMParser exists to provide backwards compatibility with XML4J V2.0

Version:
89 1.1 xml4j3/src/com/ibm/xml/parsers/NonValidatingDOMParser.java, xml4j3, xml4j3_0_1

Field Summary
static int DEFERRED
          Deprecated. Represents deferred DOM Node expansion of Node objects and data.
protected  DOMParser fParser
          Deprecated.  
static int FULL
          Deprecated. Represents full DOM Node expansion of Node objects and data.
 
Constructor Summary
NonValidatingDOMParser()
          Deprecated. Default constructor.
 
Method Summary
 Node getCurrentNode()
          Deprecated. Return the current DOM Node.
 Document getDocument()
          Deprecated. Returns the document.
 boolean getExpandEntityReferences()
          Deprecated. Return a boolean which says whether EntityReference Nodes are expanded (replaced) by this parser.
 int getNodeExpansion()
          Deprecated. Return the Node expansion level integer mapping to the constants in DOMParser.
 void parse(InputSource source)
          Deprecated. Parses the specified input source.
 void parse(java.lang.String systemId)
          Deprecated.  
 void reset()
          Deprecated.  
protected  void resetOrCopy()
          Deprecated.  
 void setDocumentClass(java.lang.String documentClass)
          Deprecated. This allows the programmer to decide which document factory to use when constructing the DOM tree.
 void setErrorHandler(ErrorHandler handler)
          Deprecated.  
 void setExpandEntityReferences(boolean expand)
          Deprecated. Sets whether EntityReference Nodes are expanded (replaced) by this parser.
 void setLocale(java.util.Locale locale)
          Deprecated.  
 void setNodeExpansion(int nodeExpansion)
          Deprecated. Sets whether Nodes are created and the data is kept within the Nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FULL

public static final int FULL
Deprecated. 
Represents full DOM Node expansion of Node objects and data.

DEFERRED

public static final int DEFERRED
Deprecated. 
Represents deferred DOM Node expansion of Node objects and data.

fParser

protected DOMParser fParser
Deprecated. 
Constructor Detail

NonValidatingDOMParser

public NonValidatingDOMParser()
Deprecated. 
Default constructor.
Method Detail

reset

public void reset()
Deprecated. 

resetOrCopy

protected void resetOrCopy()
Deprecated. 

setExpandEntityReferences

public void setExpandEntityReferences(boolean expand)
Deprecated. 
Sets whether EntityReference Nodes are expanded (replaced) by this parser. Expanded means that the children of the EntityReference Node replace it.

The default value is false, EntityReference Nodes are kept.

Parameters:
keep - =true means expanding entity references; =false means maintain entity references.
See Also:
EntityReference, com.ibm.xml.parser.GeneralReference

getExpandEntityReferences

public boolean getExpandEntityReferences()
Deprecated. 
Return a boolean which says whether EntityReference Nodes are expanded (replaced) by this parser. Expanded means that the children of the EntityReference Node replace it.

The default value is false, EntityReference Nodes are kept.

Parameters:
keep - =true means expanding entity references; =false means maintain entity references.
See Also:
EntityReference, com.ibm.xml.parser.GeneralReference

setNodeExpansion

public void setNodeExpansion(int nodeExpansion)
Deprecated. 
Sets whether Nodes are created and the data is kept within the Nodes.

Parameters:
nodeExpansion -
NonValidatingDOMParser.FULL - full expansion NonValidatingDOMParser.DEFERRED - deferred expansion

getNodeExpansion

public int getNodeExpansion()
Deprecated. 
Return the Node expansion level integer mapping to the constants in DOMParser. Signifies whether DOM Nodes are created and the data is kept within the Nodes.

Parameters:
nodeExpansion -
DOMParser.FULL - full expansion DOMParser.DEFERRED - deferred expansion

getCurrentNode

public Node getCurrentNode()
Deprecated. 
Return the current DOM Node.

This function will only return meaningful Node values when setNodeExpansion(FULL). When setNodeExpansion(DEFERRED) is set, Node creation is deferred and getCurrentNode() will likely return null.

This function is useful for querying the parser when getting an error or warning callback.

See Also:
setNodeExpansion(int)

setDocumentClass

public void setDocumentClass(java.lang.String documentClass)
Deprecated. 
This allows the programmer to decide which document factory to use when constructing the DOM tree. However, doing so will lose the parsing performance gain of the default factory.

Note: Setting the document class name to any other document class besides the default class will switch the node expansion to FULL.

Parameters:
documentClass - The fully qualified class name of the document factory to use when constructing the DOM tree.
See Also:
#DEFERRED_DOCUMENT_CLASS, setNodeExpansion(int), FULL

getDocument

public Document getDocument()
Deprecated. 
Returns the document.

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Deprecated. 

setLocale

public void setLocale(java.util.Locale locale)
               throws SAXException
Deprecated. 

parse

public void parse(InputSource source)
           throws SAXException,
                  java.io.IOException
Deprecated. 
Parses the specified input source.
Parameters:
source - The input source.
Throws:
SAXException - Throws exception on SAX error.
java.io.IOException - Throws exception on i/o error.

parse

public void parse(java.lang.String systemId)
           throws SAXException,
                  java.io.IOException
Deprecated. 

Xerces 3.1.1