public class ImageTag extends TagNode
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
imageURL
Holds the set value of the SRC attribute, since this can differ
from the attribute value due to relative references resolved by
the scanner.
|
breakTags, mAttributes, mDefaultScanner
Constructor and Description |
---|
ImageTag()
Create a new image tag.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
extractImageLocn()
Extract the location of the image
Given the tag (with attributes), and the url of the html page in which
this tag exists, perform best effort to extract the 'intended' URL.
|
java.lang.String[] |
getIds()
Return the set of names handled by this tag.
|
java.lang.String |
getImageURL()
Returns the location of the image.
|
void |
setImageURL(java.lang.String url)
Set the
SRC attribute. |
accept, breaksFlow, getAttribute, getAttributeEx, getAttributes, getAttributesEx, getEnders, getEndingLineNumber, getEndTag, getEndTagEnders, getParsed, getRawTagName, getStartingLineNumber, getTagBegin, getTagEnd, getTagName, getText, getThisScanner, isEmptyXmlTag, isEndTag, removeAttribute, setAttribute, setAttribute, setAttribute, setAttributeEx, setAttributes, setAttributesEx, setEmptyXmlTag, setEndTag, setTagBegin, setTagEnd, setTagName, setText, setThisScanner, toHtml, toPlainTextString, toString
clone, collectInto, doSemanticAction, getChildren, getEndPosition, getPage, getParent, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, collectInto, doSemanticAction, getChildren, getEndPosition, getPage, getParent, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition
protected java.lang.String imageURL
public java.lang.String[] getIds()
public java.lang.String extractImageLocn()
<IMG SRC=http://www.redgreen.com> - normal <IMG SRC =http://www.redgreen.com> - space between attribute name and equals sign <IMG SRC= http://www.redgreen.com> - space between equals sign and attribute value <IMG SRC = http://www.redgreen.com> - space both sides of equals sign
public java.lang.String getImageURL()
public void setImageURL(java.lang.String url)
SRC
attribute.url
- The new value of the SRC
attribute.HTML Parser is an open source library released under LGPL.