NAME
HTML::DublinCore::Element - Class for representing a DC element
SYNOPSIS
my $element = $dc->element( 'Title' );
print "title content: ", $element->content(), "\n";
print "title qualifier: ", $element->qualifier(), "\n";
print "title language: ", $element->language(), "\n";
print "title scheme: ", $element->scheme(), "\n";
DESCRIPTION
HTML::DublinCore methods such as element(), elements(), title(), etc return HTML::DublinCore::Element objects as their result. These can be queried further to extract an elements content, qualifier, language, and schema. For a definition of these attributes please see RFC 2731 and http://www.dublincore.org.
METHODS
new()
The constructor which you won't have to use, but which is used internally when parsing the Dublin Core out of an HTML document.
content()
Gets and sets the content of the element. This will be the most often used HTML::DublinCore::Element method since you will want to get at the content of the element.
## extract the element
my $title = $dc->element( 'title' );
print $title->content();
## or you can chain them together
print $dc->element( 'title' )->content();
qualifier()
Gets and sets the qualifier used by the element.
language()
Gets and sets the language scheme if any is used in the specified element.
scheme()
Gets and sets the scheme used by the element.
name()
Gets and sets the element name (title, creator, date, etc). This method isn't often used because you the name is often used to retrieve the element object with HTML::DublinCore::element(), or the like.
asHtml()
A method which returns the element as HTMl.
SEE ALSO
HTML::DublinCore
AUTHORS
Ed Summers <ehs@pobox.com>