org.apache.commons.jelly.tags.html
Class ParseTag

java.lang.Object
  extended by org.apache.commons.jelly.TagSupport
      extended by org.apache.commons.jelly.tags.xml.ParseTagSupport
          extended by org.apache.commons.jelly.tags.html.ParseTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class ParseTag
extends org.apache.commons.jelly.tags.xml.ParseTagSupport

A tag which parses some HTML and defines a variable with the parsed Document. The HTML can either be specified as its body or can be passed in via the html property which can be a Reader, InputStream, URL or String URI.

Version:
$Revision: 155420 $
Author:
James Strachan

Field Summary
private  java.lang.String attribute
           
private  java.lang.String element
           
private  java.lang.Object html
          The HTML to parse, either a String URI, a Reader or InputStream
private static org.apache.commons.logging.Log log
          The Log to which logging calls will be made.
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
ParseTag()
           
 
Method Summary
protected  org.dom4j.io.SAXReader createSAXReader()
          Factory method to create a new SAXReader
 void doTag(org.apache.commons.jelly.XMLOutput output)
           
 void setAttribute(java.lang.String attribute)
          Sets whether attributes should be converted to a different case.
 void setElement(java.lang.String element)
          Sets whether elements should be converted to a different case Possible values are "upper", "lower" or "match"
 void setHtml(java.lang.Object html)
          Sets the source of the HTML which is either a String URI, Reader or InputStream
 
Methods inherited from class org.apache.commons.jelly.tags.xml.ParseTagSupport
getSAXReader, getText, getVar, parse, parseBody, parseText, setSAXReader, setText, setVar
 
Methods 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log
The Log to which logging calls will be made.


html

private java.lang.Object html
The HTML to parse, either a String URI, a Reader or InputStream


element

private java.lang.String element

attribute

private java.lang.String attribute
Constructor Detail

ParseTag

public ParseTag()
Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Throws:
org.apache.commons.jelly.JellyTagException

setHtml

public void setHtml(java.lang.Object html)
Sets the source of the HTML which is either a String URI, Reader or InputStream


setAttribute

public void setAttribute(java.lang.String attribute)
Sets whether attributes should be converted to a different case. Possible values are "upper", "lower" or "no-change"

Parameters:
attribute - The processing mode of attributes

setElement

public void setElement(java.lang.String element)
Sets whether elements should be converted to a different case Possible values are "upper", "lower" or "match"

Parameters:
element - The processing mode of elements

createSAXReader

protected org.dom4j.io.SAXReader createSAXReader()
                                          throws org.xml.sax.SAXException
Factory method to create a new SAXReader

Specified by:
createSAXReader in class org.apache.commons.jelly.tags.xml.ParseTagSupport
Throws:
org.xml.sax.SAXException