<%
//creating entries for feed
var entry = new Entry();
entry.title = "Jaggery Sample Entry";
entry.content = "This is content for a sample atom entry";
entry.authors = ["wso2", "Jaggery"];
//creating list of entris
var entries = new Array();
entries.push(entry);
//creating feed
var feed= new Feed();
//adding new entries for Feed
feed.entries = entries;
//printing the feed
print(feed.toString());
%>
Try it now
Overview
Entry object is the container for entries returned by Feed.
Members
Member
Type
Description
id
String
entry.id
Returns the id.
entry.id ="id1";
Setting the id attribute.
authors
String [ ]
entry.authors[i]
Returns the i th author of the entry.
entry.authors =["author1","author2"];
Setting an array of authors to the entry.
categories
String [ ]
entry.categories[i]
Returns the i th category of the entry.
entry.categories =["cat1","cat2"];
Setting an array of categories to the entry.
content
String
entry.content
Returns the content.
entry.content ="content1";
Setting the content attribute.
contributors
String [ ]
entry.contributors[i]
Returns the i th contributor of the entry.
entry.contributors =["cont1","cont2"];
Setting an array of contributors to the entry.
links
String [ ]
entry.links[i]
Returns the i th location of the entry.
entry.links =["link1","link2"];
Setting locations of the entry.
published
Date
entry.published
Returns the published date of the entry.
var d1 =newDate("March 13, 2013 11:13:00")
entry.published = d1;
Setting published date of the entry.
rights
String
entry.rights
Returns the rights associated with this entry.
entry.rights ="right1";
Setting rights associated with this entry.
summary
String
entry.summary
Returns the summary of this entry.
entry.summary ="summary1";
Setting the summary attribute.
title
String
entry.title
Returns the title of this entry.
entry.title ="title1";
Setting the title attribute.
updated
Date
entry.updated
Returns the last updated date of the entry.
var d1 =newDate("March 13, 2013 11:13:00")
entry.updated = d1;
Setting the last updated date of the entry.
Operations
Operations
Returns
Description
Entry()
Entry
var entry =newEntry();
Returns an Entry object
toXML()
XML
entry.toXML()
Returns the E4X XML contents of this Entry object.