Package org.htmlparser.tags
Class BaseHrefTag
java.lang.Object
org.htmlparser.nodes.AbstractNode
org.htmlparser.nodes.TagNode
org.htmlparser.tags.BaseHrefTag
- All Implemented Interfaces:
Serializable,Cloneable,Node,Tag
BaseHrefTag represents an <Base> tag.
It extends a basic tag by providing an accessor to the HREF attribute.
- See Also:
-
Field Summary
Fields inherited from class org.htmlparser.nodes.TagNode
breakTags, mAttributes, mDefaultScanner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPerform the meaning of this tag.Get the value of theHREFattribute, if any.String[]getIds()Return the set of names handled by this tag.voidsetBaseUrl(String base) Set the value of theHREFattribute.Methods inherited from class org.htmlparser.nodes.TagNode
accept, breaksFlow, getAttribute, getAttributeEx, getAttributesEx, getEnders, getEndingLineNumber, getEndTag, getEndTagEnders, getRawTagName, getStartingLineNumber, getTagBegin, getTagEnd, getTagName, getText, getThisScanner, isEmptyXmlTag, isEndTag, removeAttribute, setAttribute, setAttribute, setAttribute, setAttributeEx, setAttributesEx, setEmptyXmlTag, setEndTag, setTagBegin, setTagEnd, setTagName, setText, setThisScanner, toHtml, toPlainTextString, toStringMethods inherited from class org.htmlparser.nodes.AbstractNode
clone, collectInto, getChildren, getEndPosition, getFirstChild, getLastChild, getNextSibling, getPage, getParent, getPreviousSibling, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition, toHtmlMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.htmlparser.Node
clone, collectInto, getChildren, getEndPosition, getFirstChild, getLastChild, getNextSibling, getPage, getParent, getPreviousSibling, getStartPosition, setChildren, setEndPosition, setPage, setParent, setStartPosition, toHtml
-
Constructor Details
-
BaseHrefTag
public BaseHrefTag()Create a new base tag.
-
-
Method Details
-
getIds
Return the set of names handled by this tag. -
getBaseUrl
Get the value of theHREFattribute, if any.- Returns:
- The
HREFvalue, with the leading and trailing whitespace removed, if any.
-
setBaseUrl
Set the value of theHREFattribute.- Parameters:
base- The newHREFvalue.
-
doSemanticAction
Perform the meaning of this tag. This sets the base URL to use for the rest of the page.- Specified by:
doSemanticActionin interfaceNode- Overrides:
doSemanticActionin classAbstractNode- Throws:
ParserException- If setting the base URL fails.
-