Package org.htmlparser.tags
Class MetaTag
java.lang.Object
org.htmlparser.nodes.AbstractNode
org.htmlparser.nodes.TagNode
org.htmlparser.tags.MetaTag
- All Implemented Interfaces:
Serializable,Cloneable,Node,Tag
A Meta Tag
- See Also:
-
Field Summary
Fields inherited from class org.htmlparser.nodes.TagNode
breakTags, mAttributes, mDefaultScanner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPerform the META tag semantic action.Get theHTTP-EQUIVattribute, if any.String[]getIds()Return the set of names handled by this tag.Get theCONTENTattribute, if any.Get theNAMEattribute, if any.voidsetHttpEquiv(String httpEquiv) Set theHTTP-EQUIVattribute.voidsetMetaTagContents(String metaTagContents) Set theCONTENTattribute.voidsetMetaTagName(String metaTagName) Set theNAMEattribute.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
-
MetaTag
public MetaTag()Create a new meta tag.
-
-
Method Details
-
getIds
Return the set of names handled by this tag. -
getHttpEquiv
Get theHTTP-EQUIVattribute, if any.- Returns:
- The value of the
HTTP-EQUIVattribute, ornullif the attribute doesn't exist.
-
getMetaContent
Get theCONTENTattribute, if any.- Returns:
- The value of the
CONTENTattribute, ornullif the attribute doesn't exist.
-
getMetaTagName
Get theNAMEattribute, if any.- Returns:
- The value of the
NAMEattribute, ornullif the attribute doesn't exist.
-
setHttpEquiv
Set theHTTP-EQUIVattribute.- Parameters:
httpEquiv- The new value of theHTTP-EQUIVattribute.
-
setMetaTagContents
Set theCONTENTattribute.- Parameters:
metaTagContents- The new value of theCONTENTattribute.
-
setMetaTagName
Set theNAMEattribute.- Parameters:
metaTagName- The new value of theNAMEattribute.
-
doSemanticAction
Perform the META tag semantic action. Check for a charset directive, and if found, set the charset for the page.- Specified by:
doSemanticActionin interfaceNode- Overrides:
doSemanticActionin classAbstractNode- Throws:
ParserException- If setting the encoding fails.
-