org.htmlparser.tags

Class BaseHrefTag

public class BaseHrefTag extends TagNode

BaseHrefTag represents an <Base> tag. It extends a basic tag by providing an accessor to the HREF attribute.
Constructor Summary
BaseHrefTag()
Create a new base tag.
Method Summary
voiddoSemanticAction()
Perform the meaning of this tag.
StringgetBaseUrl()
Get the value of the HREF attribute, if any.
String[]getIds()
Return the set of names handled by this tag.
voidsetBaseUrl(String base)
Set the value of the HREF attribute.

Constructor Detail

BaseHrefTag

public BaseHrefTag()
Create a new base tag.

Method Detail

doSemanticAction

public void doSemanticAction()
Perform the meaning of this tag. This sets the base URL to use for the rest of the page.

Throws: ParserException If setting the base URL fails.

getBaseUrl

public String getBaseUrl()
Get the value of the HREF attribute, if any.

Returns: The HREF value, with the leading and trailing whitespace removed, if any.

getIds

public String[] getIds()
Return the set of names handled by this tag.

Returns: The names to be matched that create tags of this type.

setBaseUrl

public void setBaseUrl(String base)
Set the value of the HREF attribute.

Parameters: base The new HREF value.

HTML Parser is an open source library released under LGPL. SourceForge.net