I/O Types

 Table of Contents

Various types of I/O are available:


I/O TypeMerge VersionsMerge Result (Output)XML CatalogNotes
HTTP(tick)(error)(tick)
File(tick)(tick)

(tick)


Strings(tick)(error)

(error) 

Can only be used from multipart/form-data

1. HTTP

HTTP URLs can be specified and the comparator will try to load the specified file.
This may involve the downloading of additional entities or other resources that are referenced by the specified file. Examples include:

  • DOCTYPE dtds
  • XML schema files using xsi association
  • General external XML entities referenced in the file
  • Resources specified using the XInclude mechanism

1.1. Examples

multipart/form-data

.....
Content-Disposition: form-data; name="A"
http://www.example.com/file1.xml
--boundary
.....

XML

In XML this is represented by setting the type attribute on the I/O element to http. The uri child element is then used to set the HTTP URI.

<Version name="A" type="http">
  <Uri>http://www.example.com/file1.xml</Uri>
</Version>

JSON

In JSON this is represented by setting the type key to http. The uri key is then used to set the HTTP URI.

...
  "Versions": [
    {
      "type": "http",
      "name": "a",
      "Uri": "http://www.example.com/file1.xml"
    } ..etc..
  ]
...

2. File

This type of I/O is only appropriate when the REST service is being run 'on-premise'. 

A file path (on the server) can also be used to specify the input, output, and catalog locations.

2.1. Examples

multipart/form-data

.....
Content-Disposition: form-data; name="A"
/Users/exampleUser/Documents/file1.xml
--boundary
.....


XML

In XML this is represented by setting the type attribute on the I/O element to file. The path child element is then used to set the file path on the server.

<Version name="A" type="file">
  <Path>/Users/exampleUser/Documents/file1.xml</Path>
</Version>


JSON

In JSON this is represented by setting the type key to file. The path key is then used to set the file path on the server.

...
  "Versions": [
    {
      "type": "file",
      "name": "A",
      "Path": "/Users/exampleUser/Documents/file1.xml"
    } ..etc..
  ]
...

3. Strings

Raw XML strings can be used from multipart/form-data. To use this you need to set the Content-Type of the part to application/xml, text/xml or application/html.

This can be achieved either through uploading a file, or raw strings directly:

........
Content-Disposition: form-data; name="A"; filename="file1.xml"
Content-Type: text/xml
--boundary
Content-Disposition: form-data; name="B"
Content-Type: text/xml
<topic id="topic_sjd_bmw_2lr"><title>Abc</title></topic>
--boundary
.......

#content .code