Class ParseTag
java.lang.Object
org.apache.commons.jelly.TagSupport
org.apache.commons.jelly.tags.core.ParseTag
- All Implemented Interfaces:
Tag
Parses the output of this tags body or of a given String as a Jelly script
then either outputting the Script as a variable or executing the script.
- Version:
- $Revision: 406153 $
- Author:
- James Strachan
-
Field Summary
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, parent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected XMLParserFactory method to create a new Jelly parserprotected XMLReaderFactory method to create a new XMLReadervoidEvaluates this tag after all the tags properties have been initialized.getText()Returns the text to be parsedgetVar()The variable name that will be used for the Document variable createdprotected voidParses the body of this tag and returns the parsed documentprotected voidParses the give piece of text as being markupvoidsetJellyParser(XMLParser jellyParser) Sets the jellyParser.voidSets the text to be parsed by this parservoidSets the variable name that will be used for the Document variable createdvoidsetXMLReader(XMLReader xmlReader) Sets the XMLReader used for parsingMethods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
-
Constructor Details
-
ParseTag
public ParseTag()
-
-
Method Details
-
doTag
Description copied from interface:TagEvaluates this tag after all the tags properties have been initialized. -
getVar
The variable name that will be used for the Document variable created -
setVar
Sets the variable name that will be used for the Document variable created -
getText
Returns the text to be parsed- Returns:
- String
-
setText
Sets the text to be parsed by this parser- Parameters:
text- The text to be parsed by this parser
-
getXMLReader
- Returns:
- the XMLReader used for parsing, creating one lazily if need be
- Throws:
ParserConfigurationExceptionSAXException
-
setXMLReader
Sets the XMLReader used for parsing -
getJellyParser
- Returns:
- XMLParser
-
setJellyParser
Sets the jellyParser.- Parameters:
jellyParser- The jellyParser to set
-
createXMLReader
Factory method to create a new XMLReader -
parseBody
Parses the body of this tag and returns the parsed document- Throws:
JellyTagException
-
parseText
Parses the give piece of text as being markup- Throws:
JellyTagException
-
createJellyParser
Factory method to create a new Jelly parser- Returns:
- XMLParser
-