org.htmlparser.tags
Class BaseHrefTag
java.lang.Object
org.htmlparser.AbstractNode
org.htmlparser.lexer.nodes.TagNode
org.htmlparser.tags.Tag
org.htmlparser.tags.BaseHrefTag
- All Implemented Interfaces:
- Cloneable, Node, Serializable
- public class BaseHrefTag
- extends Tag
BaseHrefTag represents an <Base> tag.
It extends a basic tag by providing an accessor to the HREF attribute.
- See Also:
- Serialized Form
|
Constructor Summary |
BaseHrefTag()
Create a new base tag. |
| Methods inherited from class org.htmlparser.lexer.nodes.TagNode |
breaksFlow, getAttribute, getAttributeEx, getAttributes, getAttributesEx, getEndingLineNumber, getParameter, getParsed, getRawTagName, getStartingLineNumber, getTagBegin, getTagEnd, getTagName, getText, isEmptyXmlTag, isEndTag, removeAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setAttributesEx, setEmptyXmlTag, setTagBegin, setTagEnd, setTagName, setText, toHtml, toPlainTextString, toString |
| Methods inherited from class org.htmlparser.AbstractNode |
collectInto, elementBegin, elementEnd, getChildren, getEndPosition, getPage, getParent, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition, toHTML |
BaseHrefTag
public BaseHrefTag()
- Create a new base tag.
getIds
public String[] getIds()
- Return the set of names handled by this tag.
- Overrides:
getIds in class Tag
- Returns:
- The names to be matched that create tags of this type.
getBaseUrl
public String getBaseUrl()
- Get the value of the HREF attribute, if any.
- Returns:
- The HREF value, with the last slash removed, if any.
setBaseUrl
public void setBaseUrl(String base)
doSemanticAction
public void doSemanticAction()
throws ParserException
- Perform the meaning of this tag.
This sets the base URL to use for the rest of the page.
- Specified by:
doSemanticAction in interface Node- Overrides:
doSemanticAction in class AbstractNode
- Throws:
ParserException
HTML Parser is an open source library released under LGPL.