|
ParserUtils (Jasper Internal API Documentation)
org.apache.jasper.parser
|
Field Summary | |
protected java.lang.ClassLoader |
classLoader
The class loader to use for accessing our XML parser. |
entityResolver
An entity resolver for use when parsing XML documents. |
|
errorHandler
An error handler for use when parsing XML documents. |
Constructor Summary | |
ParserUtils()
|
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. |
static java.lang.ClassLoader |
createClassLoader(java.lang.ClassLoader parentLoader)
Construct (if necessary) and return a class loader that has been configured with the specified parent class loader, and repositories as needed to access the required XML parser. |
static ParserUtils |
createParserUtils(java.lang.ClassLoader parentLoader)
Create (if necessary) and return an instance of ParserUtils that has been loaded by our subordinate class loader (and therefore should have access to the XML parser that is visible to repositories of that class loader). |
java.lang.ClassLoader |
getClassLoader()
Return the class loader used to access our XML parser. |
static void |
main(java.lang.String[] args)
Usage: java org.apache.jasper.parser.ParserUtils {pathname} |
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. |
void |
setClassLoader(java.lang.ClassLoader classLoader)
Set the class loader used to access our XML parser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.ClassLoader classLoader
Constructor Detail |
public ParserUtils()
Method Detail |
public static void main(java.lang.String[] args)
public java.lang.ClassLoader getClassLoader()
public TreeNode parseXMLDocument(java.lang.String uri, java.io.InputStream is) throws JasperException
TreeNode
that corresponds to the root node of the document tree.
uri
- URI of the XML document being parsedis
- Input stream containing the deployment descriptor
JasperException
- if an input/output error occurs
JasperException
- if a parsing error occurspublic void setClassLoader(java.lang.ClassLoader classLoader)
classLoader
- The new class loaderprotected TreeNode convert(TreeNode parent, org.w3c.dom.Node node)
parent
- The parent TreeNode (if any) for the new TreeNodenode
- The XML document Node to be convertedpublic static ParserUtils createParserUtils(java.lang.ClassLoader parentLoader)
parentLoader
- The web application class loaderpublic static java.lang.ClassLoader createClassLoader(java.lang.ClassLoader parentLoader) throws java.net.MalformedURLException
parentLoader
- The web application class loader
java.net.MalformedURLException
- if we cannot create a valid URL for
one of the required repositories
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |