org.apache.commons.jelly.tags.xml
Class ParseTagSupport

java.lang.Object
  |
  +--org.apache.commons.jelly.TagSupport
        |
        +--org.apache.commons.jelly.tags.xml.ParseTagSupport
All Implemented Interfaces:
Tag
Direct Known Subclasses:
ParseTag, ParseTag

public abstract class ParseTagSupport
extends TagSupport

An abstract base class for any tag which parsers its body as XML.

Version:
$Revision: 1.9 $
Author:
James Strachan

Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
ParseTagSupport()
           
 
Method Summary
protected abstract  org.dom4j.io.SAXReader createSAXReader()
          Factory method to create a new SAXReader
 org.dom4j.io.SAXReader getSAXReader()
           
 java.lang.String getVar()
          The variable name that will be used for the Document variable created
protected  org.dom4j.Document parse(java.lang.Object source)
          Parses the given source
protected  org.dom4j.Document parseBody(XMLOutput output)
          Parses the body of this tag and returns the parsed document
 void setSAXReader(org.dom4j.io.SAXReader saxReader)
          Sets the SAXReader used for parsing
 void setVar(java.lang.String var)
          Sets the variable name that will be used for the Document variable created
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, getBody, 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
 
Methods inherited from interface org.apache.commons.jelly.Tag
doTag
 

Constructor Detail

ParseTagSupport

public ParseTagSupport()
Method Detail

getVar

public java.lang.String getVar()
The variable name that will be used for the Document variable created

setVar

public void setVar(java.lang.String var)
Sets the variable name that will be used for the Document variable created

getSAXReader

public org.dom4j.io.SAXReader getSAXReader()
                                    throws java.lang.Exception
Returns:
the SAXReader used for parsing, creating one lazily if need be

setSAXReader

public void setSAXReader(org.dom4j.io.SAXReader saxReader)
Sets the SAXReader used for parsing

createSAXReader

protected abstract org.dom4j.io.SAXReader createSAXReader()
                                                   throws java.lang.Exception
Factory method to create a new SAXReader

parseBody

protected org.dom4j.Document parseBody(XMLOutput output)
                                throws java.lang.Exception
Parses the body of this tag and returns the parsed document

parse

protected org.dom4j.Document parse(java.lang.Object source)
                            throws java.lang.Exception
Parses the given source


Copyright © 2002-2002 Apache Software Foundation. All Rights Reserved.