Apache Tomcat 6.0.51

## org.apache.jasper.xmlparser
Class ParserUtils

    java.lang.Object
      org.apache.jasper.xmlparser.ParserUtils

    public class ParserUtils

extends java.lang.Object

XML parsing utilities for processing web application deployment descriptor and tag library descriptor files. FIXME - make these use a separate class loader for the parser to be used.

Author:
  Craig R. McClanahan

Field Summary
`static boolean` | `validating` Deprecated. Unused. Will be removed in Tomcat 7. Use `ParserUtils(boolean,boolean)` instead.

Constructor Summary
`ParserUtils()` Deprecated. Unused. Will be removed in Tomcat 7. Use `ParserUtils(boolean,boolean)` instead.
`ParserUtils(boolean useValidation, boolean blockExternal)`

Method Summary
`protected TreeNode` | `convert(TreeNode parent, org.w3c.dom.Node node)` Create and return a TreeNode that corresponds to the specified Node, including processing all of the attributes and children nodes.
`TreeNode` | `parseXMLDocument(java.lang.String location, org.xml.sax.InputSource is)` Parse the specified XML document, and return a `TreeNode` that corresponds to the root node of the document tree.
`TreeNode` | `parseXMLDocument(java.lang.String uri, java.io.InputStream is)` Parse the specified XML document, and return a `TreeNode` that corresponds to the root node of the document tree.
`static void` | `setEntityResolver(org.xml.sax.EntityResolver er)` Set the EntityResolver.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### validating

    @Deprecated
    public static boolean validating

  Deprecated. Unused. Will be removed in Tomcat 7. Use `ParserUtils(boolean,boolean)` instead.

Constructor Detail

### ParserUtils

    @Deprecated
    public ParserUtils()

  Deprecated. Unused. Will be removed in Tomcat 7. Use `ParserUtils(boolean,boolean)` instead.

### ParserUtils

    public ParserUtils(boolean useValidation,
                       boolean blockExternal)

Method Detail

### parseXMLDocument

    public TreeNode parseXMLDocument(java.lang.String location,
                                     org.xml.sax.InputSource is)
                              throws JasperException

  Parse the specified XML document, and return a `TreeNode` that corresponds to the root node of the document tree.

  Parameters:
    `location` - Location (eg URI) of the XML document being parsed
    `is` - Input source containing the deployment descriptor
  Throws:
    `JasperException` - if an input/output error occurs
    `JasperException` - if a parsing error occurs

### parseXMLDocument

    public TreeNode parseXMLDocument(java.lang.String uri,
                                     java.io.InputStream is)
                              throws JasperException

  Parse the specified XML document, and return a `TreeNode` that corresponds to the root node of the document tree.

  Parameters:
    `uri` - URI of the XML document being parsed
    `is` - Input stream containing the deployment descriptor
  Throws:
    `JasperException` - if an input/output error occurs
    `JasperException` - if a parsing error occurs

### setEntityResolver

    public static void setEntityResolver(org.xml.sax.EntityResolver er)

  Set the EntityResolver. This is needed when the dtds and Jasper itself are in different classloaders (e.g. OSGi environment).

  Parameters:
    `er` - EntityResolver to use.

### convert

    protected TreeNode convert(TreeNode parent,
                               org.w3c.dom.Node node)

  Create and return a TreeNode that corresponds to the specified Node, including processing all of the attributes and children nodes.

  Parameters:
    `parent` - The parent TreeNode (if any) for the new TreeNode
    `node` - The XML document Node to be converted

Apache Tomcat 6.0.51

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.