org.apache.commons.jelly.tags.betwixt
Class ParseTag
java.lang.Object
|
+--org.apache.commons.jelly.TagSupport
|
+--org.apache.commons.jelly.tags.betwixt.ParseTag
- All Implemented Interfaces:
- Tag
- public class ParseTag
- extends TagSupport
Parses some XML specified via the given URI (which can be relative or an absolute URL) and outputs the
parsed object. Typically this tag is customized by setting the introspector attribute or nesting a child
introspector tag inside it.
- Version:
- $Revision: 1.7 $
- Author:
- James Strachan
Method Summary |
void |
doTag(XMLOutput output)
Evaluates this tag after all the tags properties have been initialized. |
protected java.lang.ClassLoader |
getClassLoader()
|
org.apache.commons.betwixt.XMLIntrospector |
getIntrospector()
|
void |
setClassLoader(java.lang.ClassLoader classLoader)
Sets the ClassLoader to be used to load bean classes from. |
void |
setIntrospector(org.apache.commons.betwixt.XMLIntrospector introspector)
Sets the Betwixt XMLIntrospector instance used to define the metadata for how a
bean should appear as XML. |
void |
setPath(java.lang.String path)
Sets the path that the root class should be bound to. |
void |
setRootClass(java.lang.String rootClass)
Sets the name of the root class to use for parsing the XML |
void |
setUri(java.lang.String uri)
Sets the URI from which XML is parsed. |
void |
setUseContextClassLoader(boolean useContextClassLoader)
Sets whether or not the current threads's context class loader
should be used to load the bean classes or not. |
void |
setVar(java.lang.String var)
Sets the variable name to output with the result of the XML parse. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParseTag
public ParseTag()
doTag
public void doTag(XMLOutput output)
throws java.lang.Exception
- Description copied from interface:
Tag
- Evaluates this tag after all the tags properties have been initialized.
getIntrospector
public org.apache.commons.betwixt.XMLIntrospector getIntrospector()
- Returns:
- the introspector to be used, lazily creating one if required.
setIntrospector
public void setIntrospector(org.apache.commons.betwixt.XMLIntrospector introspector)
- Sets the Betwixt XMLIntrospector instance used to define the metadata for how a
bean should appear as XML.
setUri
public void setUri(java.lang.String uri)
- Sets the URI from which XML is parsed. This can be relative to this Jelly script, use
an absolute URI or a full URL
setVar
public void setVar(java.lang.String var)
- Sets the variable name to output with the result of the XML parse.
setRootClass
public void setRootClass(java.lang.String rootClass)
- Sets the name of the root class to use for parsing the XML
setPath
public void setPath(java.lang.String path)
- Sets the path that the root class should be bound to.
This is optional and often unnecessary though can be used to ignore some wrapping
elements, such as the <rss> element in the RSS unit test.
setUseContextClassLoader
public void setUseContextClassLoader(boolean useContextClassLoader)
- Sets whether or not the current threads's context class loader
should be used to load the bean classes or not.
This can be useful if running inside a web application or inside some
application server.
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
- Sets the ClassLoader to be used to load bean classes from.
If this is not specified then either the ClassLoader used to load this tag library
is used or, if the 'useContextClassLoader' property is true, then the
current threads context class loader is used instead.
getClassLoader
protected java.lang.ClassLoader getClassLoader()
- Returns:
- the ClassLoader to be used to load bean classes.
Copyright © 2002-2002 Apache Software Foundation. All Rights Reserved.