Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Create new Version 2 (Net)

Группа действийAction group: XML

Описание

Создает новый пустой контекст.

Иконка действия

Image Removed

Параметры

Входные параметры

Версия                             Версия создаваемого документа

Кодировка                      Кодировка

Выходные параметры

Контекст                          XML-контекст.

...

Версия создаваемого документа.

По умолчанию 1.0

...

Кодировка.

По умолчанию UTF-8

...

...

Description

The action creates new empty context

Action icon

Image Added

Settings of parameters

ParameterDescription
VersionA version of the document to be created.
EncodingEncoding.

Output parameters

Context name - XML-context.

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
VersionThe version of a new document. The default is 1.0Robin.String
No
EncodingEncoding. Default UTF-8Robin.String
No
Results
ContextContext of an empty XML documentRobin.XMLXML context

Special conditions of use

None.

Example of use

Task

Create a new XML-document with a root element INVENTORY and a nested BOOK element that has attributes TITLE

...

Контекст

...

XML-контекст.

...

Особые условия использования

Отсутствуют.

Пример использования

Задача

Создать новый XML-документ с корневым элементом INVENTORY и вложенным в него элементом BOOK, который имеет атрибуты TITLE="The Adventures of Huckleberry Finn" и and AUTHOR="Mark Twain". Сохранить полученный XML на рабочий столSave the resulting XML to the workspaceРешение

Solution

Воспользоваться действиями "Создать новый контекстUse the "Create new", "Добавить элементAdd element", "Сохранить в файл"Save to file" actions.

Реализация

Implementation

  1. Assemble a robot scheme with the actions.Собрать схему робота, состоящего из действий:

  2. Настроить параметр действия "Создать новый"Set the "Create new" action parameter.

  3. Настроить параметры действия "Добавить элемент". (для корневого элемента INVENTORY). 
    Image Removed
  4. Настроить параметры для действия "Добавить элемент" (для элемента BOOK). 
    Image Removed
    В поле "Атрибуты" указать атрибуты для элемента BOOK. 
    Image RemovedImage Removed
  5. Настроить параметры для действия "Сохранить в файл". 
    Image Removed
  6. Нажать на кнопку "Старт" в верхней панели. 

Результат:

Программный робот отработал успешно. 

Image Removed

Созданный XML сохранен на рабочем столе. 

  1. Set the "Add element" action parameters (for root element INVENTORY).
    Image Added
  2. Set the "Add element" action parameters (for element BOOK).
    Image Added


    In the "Attributes" field specify the attributes for the BOOK element.
    Image AddedImage Added

  3. Set the "Save to file" action parameters.
    Image Added
  4. Click "Start" in the top panel.

Result

The program robot completed successfully.

Image Added


The created XML is saved to the workspace.

Image Added

 Image Removed