org.htmlparser.tags

Class MetaTag

public class MetaTag extends TagNode

A Meta Tag
Constructor Summary
MetaTag()
Create a new meta tag.
Method Summary
voiddoSemanticAction()
Perform the META tag semantic action.
StringgetHttpEquiv()
Get the HTTP-EQUIV attribute, if any.
String[]getIds()
Return the set of names handled by this tag.
StringgetMetaContent()
Get the CONTENT attribute, if any.
StringgetMetaTagName()
Get the NAME attribute, if any.
voidsetHttpEquiv(String httpEquiv)
Set the HTTP-EQUIV attribute.
voidsetMetaTagContents(String metaTagContents)
Set the CONTENT attribute.
voidsetMetaTagName(String metaTagName)
Set the NAME attribute.

Constructor Detail

MetaTag

public MetaTag()
Create a new meta tag.

Method Detail

doSemanticAction

public void doSemanticAction()
Perform the META tag semantic action. Check for a charset directive, and if found, set the charset for the page.

Throws: ParserException If setting the encoding fails.

getHttpEquiv

public String getHttpEquiv()
Get the HTTP-EQUIV attribute, if any.

Returns: The value of the HTTP-EQUIV attribute, or null if the attribute doesn't exist.

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.

getMetaContent

public String getMetaContent()
Get the CONTENT attribute, if any.

Returns: The value of the CONTENT attribute, or null if the attribute doesn't exist.

getMetaTagName

public String getMetaTagName()
Get the NAME attribute, if any.

Returns: The value of the NAME attribute, or null if the attribute doesn't exist.

setHttpEquiv

public void setHttpEquiv(String httpEquiv)
Set the HTTP-EQUIV attribute.

Parameters: httpEquiv The new value of the HTTP-EQUIV attribute.

setMetaTagContents

public void setMetaTagContents(String metaTagContents)
Set the CONTENT attribute.

Parameters: metaTagContents The new value of the CONTENT attribute.

setMetaTagName

public void setMetaTagName(String metaTagName)
Set the NAME attribute.

Parameters: metaTagName The new value of the NAME attribute.

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