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

Ключ

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

...

Create new with XSD Version  8 (Net)

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

...

Description

"The action creates the context of an XML-file context according to the schema specified in the XSD-file.

...

Action icon

Image Modified

Параметры

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

XSD файл                         Файл, определяющий правила создания XML

Параметры                      Значения параметров для подстановки

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

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

Настройки

Settings of parameters

ParameterDescription
XSD-
СвойствоОписаниеТипПример заполненияОбязательность заполнения поляПараметрыXSD
filePath to the file with .xsd extension that contains an XML schema
"Путь к файлуДа

Options

Значения элементов
.
OptionsA collection with the values of the elements to be set
КоллекцияНетРезультатыContext name

XML-контекст

Идентификатор контекста XMLНет
.

Output parameters

Context - context of a new XML-document. 

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
XSD fileFile with XSD-schemeRobin.FilePath
Yes
OptionsValue of parametersRobin.Collection
No
Results
ContextContext of a new XML documentRobin.XMLXML context

More about Подробнее о XSD https://habr.com/ru/post/90696/

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

В действие  заложена "проверка" типов данных, переданных в коллекцию:

  • Если переданные данные из коллекции, не соответствуют типам данных XSD-файла, то выдается сообщение: "Тип значений, указанных в коллекции, не соответствуют типам данных, которые указаны в XSD-файле."
  • Если в коллекции не указаны значения для обязательных параметров, то выдается сообщение: "В коллекции не указаны значения для элементов, которые указаны в XSD-файле как обязательные."
  • Если пользователь указывает некорректный параметр, то выдается сообщение: "Указан файл с некорректным расширением. Допустимое расширение - xsd."
  • Если пользователь указывает невалидный XSD-файл (неправильный синтаксис), то выдается сообщение: "Указанный файл имеет недопустимый синтаксис."

Пример использования (нужно менять)

Задача

Создать новый контект по работе с XML документом, используя XSD

Решение

Воспользоваться действием "Создать по XSD". 

Реализация

...

Special conditions of use

The action involves "checking" the types of data passed to the collection:

  • If the transferred data from the collection does not match the data types of the XSD-file, the following message is displayed: "The type of values specified in the collection do not match the data types that are specified in the XSD-file."
  • If no values for mandatory parameters are specified in the collection, the following message is displayed: "The collection does not contain values for items that are specified as mandatory in the XSD-file".
  • If the user specifies an invalid parameter, the following message will be displayed: "Specified file has an invalid extension. The valid extension is xsd."
  • If the user specifies an invalid XSD-file (invalid syntax), the following message will be displayed: "The specified file has invalid syntax".

Example of use

Task

Create a new context on working with XML-documents using XSD. 

Solution

Use the "Create new with XSD" action.

Implementation

  1. Move the "Create new with XSD" action to the workspace.
    Image Added
  2. Set the "Create new with XSD" action parameters.
    In the "XSD-file" field, specify the path to the file where the XSD-file template is stored or specify a template for XML-file, which will specify in what order and which elements will be created in the XSD-file.
    Image Added 
  3. In the "Parameters" field set elements parameters.The substitution will follow the order in which the elements are specified.
    Image Added     

Click "Start" in the top panel.

Result

The program robot completed successfully.

Image Added

You can see the result in the File_XSD file at the address where the file was saved to.

Image Added

You can see the result in the File_XSD file at the address where the file was saved to

Image Added

In order to specify a template for XML-file, which will specify in what order and which elements will be created in XSD-file do the following:

  • In the "XSD-file" field specify "XSD" parameter.

Image Added

  • In the "Parameters" field set values for the elements. The substitution will follow the order in which the elements are specified.

Image Added

After setting the parameters, similarly to the previous example, click "Start" and start the robot scheme.

Результат

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

Image Removed