История страницы
...
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
Параметры
Входные параметры
XSD файл Файл, определяющий правила создания XML
Параметры Значения параметров для подстановки
Выходные параметры
Контекст XML-контекст
Настройки
Settings of parameters
Parameter | Description |
---|---|
XSD- |
file | Path to the file with .xsd extension that contains an XML schema |
Options
Значения элементов. | |
Options | A collection with the values of the elements to be set |
XML-контекст
. |
Output parameters
Context - context of a new XML-document.
Settings
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
XSD file | File with XSD-scheme | Robin.FilePath | Yes | |
Options | Value of parameters | Robin.Collection | No | |
Results | ||||
Context | Context of a new XML document | Robin.XML | XML 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
- Move the "Create new with XSD" action to the workspace.
- 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.
- In the "Parameters" field set elements parameters.The substitution will follow the order in which the elements are specified.
Click "Start" in the top panel.
Result
The program robot completed successfully.
You can see the result in the File_XSD file at the address where the file was saved to.
You can see the result in the File_XSD file at the address where the file was saved to
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.
- In the "Parameters" field set values for the elements. The substitution will follow the order in which the elements are specified.
After setting the parameters, similarly to the previous example, click "Start" and start the robot scheme.
Результат
Программный робот отработал успешно.