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 its base class before proceeding.
- new(%params or $body)
-
The constructor of XML::Atom::Syndication::Content acts like any other subclass of XML::Atom::Syndication::Object recognizing Elem, Namespace and Version elements in the optional HASH that can be passed. This class also recognizes Body and Type elements 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.
- base($uri)
-
An accessor to the xml:base attribute of the content object.
- 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 atteribute and process it accordingly. If type has not been defined then it is treated as escaped text.
- language($code)
-
An accessor to the xml:lang attribute of the object.
ELEMENT ACCESSORS
The following known Atom elements can be accessed through objects of this class. See ELEMENT ACCESSORS in XML::Atom::Syndication::Object for more detail.
- 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.
- src
-
An IRI that can be used to retreive the content.
AUTHOR & COPYRIGHT
Please see the XML::Atom::Syndication manpage for author, copyright, and license information.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 138:
=begin without a target?
- Around line 231:
'=end' without a target?