Create feed (RSS)
Creates RSS feed text
- Parameters
- Advanced call ?
Function CreateFeedRSS(Val ChannelTitle, Val ChannelDescription, Val ChannelLink, Val Items, Val UpdateDate = Undefined) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| ChannelTitle | --name | String | ✔ | Channel title |
| ChannelDescription | --descr | String | ✔ | Channel description |
| ChannelLink | --link | String | ✔ | Channel link |
| Items | --items | Array of Structure | ✔ | Feed items. See GetFeedItemStructureRSS |
| UpdateDate | --date | Date, Undefined | ✖ | Update date. Current if not filled |
Returns
String - Channel XML feed
| Parameter | Description |
|---|---|
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
ChannelTitle = "Test RSS channel";
ChannelDescription = "Test RSS channel description";
ChannelLink = "https://example.com";
ItemsArray = New Array;
ElementStructure = OPI_RSS.GetFeedItemStructureRSS(True);
ElementStructure["title"] = "First element";
ElementStructure["description"] = "First element description";
ElementStructure["link"] = "https://example.com/item1";
ElementStructure["pubDate"] = OPI_Tools.GetCurrentDate();
ElementStructure["author"] = "test@example.com";
ElementStructure["guid"] = "item-1";
ItemsArray.Add(ElementStructure);
ElementStructure = OPI_RSS.GetFeedItemStructureRSS(True);
ElementStructure["title"] = "Second element";
ElementStructure["description"] = "Second element description";
ElementStructure["link"] = "https://example.com/item2";
ElementStructure["pubDate"] = OPI_Tools.GetCurrentDate();
ElementStructure["author"] = "test@example.com";
ElementStructure["guid"] = "item-2";
ItemsArray.Add(ElementStructure);
Result = OPI_RSS.CreateFeedRSS(ChannelTitle, ChannelDescription, ChannelLink, ItemsArray);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint rss CreateFeedRSS \
--name "Test RSS channel" \
--descr "Test RSS channel description" \
--link "https://example.com" \
--items "[{'title':'First element','description':'First element description','link':'https://example.com/item1','pubDate':'06/18/2026 16:09:38','author':'test@example.com','guid':'item-1'},{'title':'Second element','description':'Second element description','link':'https://example.com/item2','pubDate':'06/18/2026 16:09:40','author':'test@example.com','guid':'item-2'}]"
:: JSON data can also be passed as a path to a .json file
oint rss CreateFeedRSS ^
--name "Test RSS channel" ^
--descr "Test RSS channel description" ^
--link "https://example.com" ^
--items "[{'title':'First element','description':'First element description','link':'https://example.com/item1','pubDate':'06/18/2026 16:09:38','author':'test@example.com','guid':'item-1'},{'title':'Second element','description':'Second element description','link':'https://example.com/item2','pubDate':'06/18/2026 16:09:40','author':'test@example.com','guid':'item-2'}]"
Result
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<rss version=\"2.0\">\n <channel>\n <title>Test RSS cha..."