org.apache.struts2.jasper.xmlparser

## Class ParserUtils

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

-     public class ParserUtils
      extends 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.
  Version:
    $Revision: 595799 $ $Date: 2007-11-16 21:02:12 +0100 (Fri, 16 Nov 2007) $
  Author:
    Craig R. McClanahan

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `validating`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParserUtils()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected TreeNode` | `convert(TreeNode parent, Node node)` Create and return a TreeNode that corresponds to the specified Node, including processing all of the attributes and children nodes.
    `TreeNode` | `parseXMLDocument(String uri, InputSource is)` Parse the specified XML document, and return a `TreeNode` that corresponds to the root node of the document tree.
    `TreeNode` | `parseXMLDocument(String uri, InputStream is)` Parse the specified XML document, and return a `TreeNode` that corresponds to the root node of the document tree.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### validating

          public static boolean validating

  - ### Constructor Detail

    - #### ParserUtils

          public ParserUtils()

  - ### Method Detail

    - #### parseXMLDocument

          public TreeNode parseXMLDocument(String uri,
                                           InputSource 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 source containing the deployment descriptor
      Returns:
        the tree node
      Throws:
        `JasperException` - if an input/output error occurs or parsing error occurs

    - #### parseXMLDocument

          public TreeNode parseXMLDocument(String uri,
                                           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
      Returns:
        the tree node
      Throws:
        `JasperException` - if an input/output error occurs or parsing error occurs

    - #### convert

          protected TreeNode convert(TreeNode parent,
                                     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
      Returns:
        the tree node

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.