NAME
XML::Atom::Syndication::Content - class representing Atom entry content.
DESCRIPTION
The content element either contains or links to the content of the entry. The content of this element is Language-Sensative.
METHODS
XML::Atom::Syndication::Content is a subclass of XML::Atom::Syndication:::Object that it inherits numerous methods from. You should already be familar with this base class before proceeding.
- new(%params)
- new($body)
-
The constructor of XML::Atom::Syndication::Content acts like any other subclass of XML::Atom::Syndication::Object recognizing
Elem
,Namespace
andVersion
elements in the optional HASH that can be passed. This class also recognizesBody
andType
elements in the hash which map to the like named methods.You can also pass in a string instead of a HASH. This string will be used as the body of the content and stored as escaped content.
NOTE: If you pass in a string it will be stored as escaped content. In other words, Base64 and XML content cannot use this shorthand. Instead developers should pass a Body and Type element in a hash.
- body($data)
-
An accessor to set the body of the content if any. If a src attribute has been defined the body should be empty.
NOTE: You must set the content type before you set the body in order for the content to be stored properly. As per section 4.1.3.3 of the Atom Sysndication Format specification, content processing is determined by the type attribute regardless of what the actual content is. The body method will not attempt to determine the format of content, it will simply reference the type attribute and process it accordingly. If type has not been defined then it is treated as escaped text.
- type
-
The format of the content. The value of type may be one "text", "html", or "xhtml". Failing that, it must conform to the syntax of a MIME media type, but not be a composite type. See section 4.2.6 of draft-freed-media-type-reg-04 for more.
This accessor returns a string. You can set this attribute by passing in an optional string.
- src
-
An IRI that can be used to retreive the content.
This accessor returns a string. You can set this attribute by passing in an optional string.
DEPRECATED
- mode
-
Indicates the method used to encode the content. This attribute was present in version 0.3 of the format and removed by version 1.0. It function was assumed by the type attribute and refinements to the content processing model.
This accessor returns a string. You can set this attribute by passing in an optional string.
AUTHOR & COPYRIGHT
Please see the XML::Atom::Syndication manpage for author, copyright, and license information.
3 POD Errors
The following errors were encountered while parsing the POD:
- Around line 119:
=begin without a target?
- Around line 211:
You forgot a '=back' before '=head1'
- Around line 218:
'=end' without a target?