Create feed (Atom)
Creates the text of an Atom feed
- Parameters
- Advanced call ?
Function CreateFeedAtom(Val FeedTitle, Val FeedLink, Val FeedID, Val Items, Val UpdateDate = Undefined) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| FeedTitle | --name | String | ✔ | Feed title |
| FeedLink | --link | String | ✔ | Feed URL |
| FeedID | --id | String | ✔ | Feed unique identifier (usually a URL) |
| Items | --items | Array of Structure | ✔ | Feed items. See GetFeedItemStructureAtom |
| UpdateDate | --date | Date, Undefined | ✖ | Update date. Current if not filled |
Returns
String - Atom XML feed
| Parameter | Description |
|---|---|
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
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);
- Bash
- CMD/Bat
# 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'}]"
:: 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>"