Skip to main content

Create feed (Atom)

Creates the text of an Atom feed

Function CreateFeedAtom(Val FeedTitle, Val FeedLink, Val FeedID, Val Items, Val UpdateDate = Undefined) Export

ParameterCLI optionTypeRequiredDescription
FeedTitle--nameStringFeed title
FeedLink--linkStringFeed URL
FeedID--idStringFeed unique identifier (usually a URL)
Items--itemsArray of StructureFeed items. See GetFeedItemStructureAtom
UpdateDate--dateDate, UndefinedUpdate date. Current if not filled
Returns

String - Atom XML feed

1C:Enterprise/OneScript code example
FeedTitle = "Test Atom feed";
FeedLink = "https://example.com";
FeedID = "https://example.com/feed";

ItemsArray = New Array;

ElementStructure = OPI_RSS.GetFeedItemStructureAtom(True);
ElementStructure["title"] = "First record";
ElementStructure["id"] = "https://example.com/entry1";
ElementStructure["link"] = "https://example.com/entry1";
ElementStructure["updated"] = OPI_Tools.GetCurrentDate();
ElementStructure["summary"] = "First record summary";
ElementStructure["content"] = "Full content of the first record";
ElementStructure["author"] = "First Author";
ElementStructure["published"] = OPI_Tools.GetCurrentDate();

ItemsArray.Add(ElementStructure);

ElementStructure = OPI_RSS.GetFeedItemStructureAtom(True);
ElementStructure["title"] = "Second record";
ElementStructure["id"] = "https://example.com/entry2";
ElementStructure["link"] = "https://example.com/entry2";
ElementStructure["updated"] = OPI_Tools.GetCurrentDate();
ElementStructure["summary"] = "Second record summary";
ElementStructure["content"] = "Full content of the second record";
ElementStructure["author"] = "Second Author";
ElementStructure["published"] = OPI_Tools.GetCurrentDate();

ItemsArray.Add(ElementStructure);

Result = OPI_RSS.CreateFeedAtom(FeedTitle, FeedLink, FeedID, ItemsArray);
# JSON data can also be passed as a path to a .json file

oint rss CreateFeedAtom \
--name "Test Atom feed" \
--link "https://example.com" \
--id "https://example.com/feed" \
--items "[{'title':'First record','id':'https://example.com/entry1','link':'https://example.com/entry1','updated':'05/26/2026 14:40:22','summary':'First record summary','content':'Full content of the first record','author':'First Author','published':'05/26/2026 14:40:22'},{'title':'Second record','id':'https://example.com/entry2','link':'https://example.com/entry2','updated':'05/26/2026 14:40:23','summary':'Second record summary','content':'Full content of the second record','author':'Second Author','published':'05/26/2026 14:40:23'}]"
Result
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<feed xmlns=\"http://www.w3.org/2005/Atom\">\n <title>Test Atom feed</title>\n <id>https://example.com/feed</id>\n <link href=\"https://example.com\" rel=\"alternate\"/>\n <updated>2026-05-26T14:40:23</updated>\n <entry>\n <title>First record</title>\n <id>https://example.com/entry1</id>\n <link href=\"https://example.com/entry1\" rel=\"alternate\"/>\n <updated>2026-05-26T14:40:22</updated>\n <summary>First record summary</summary>\n <content type=\"html\">Full content of the first record</content>\n <author>\n <name>First Author</name>\n </author>\n <published>2026-05-26T14:40:22</published>\n </entry>\n <entry>\n <title>Second record</title>\n <id>https://example.com/entry2</id>\n <link href=\"https://example.com/entry2\" rel=\"alternate\"/>\n <updated>2026-05-26T14:40:23</updated>\n <summary>Second record summary</summary>\n <content type=\"html\">Full content of the second record</content>\n <author>\n <name>Second Author</name>\n </author>\n <published>2026-05-26T14:40:23</published>\n </entry>\n</feed>"