Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## 1.1.0 (June 24, 2019)

* Update `README`

## 1.0.0 (December 29, 2016)

* Initial release
54 changes: 23 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@

# xml-component
# XML Component

## Description
This is an open source component for Converting XML to and from JSON on elastic.io platform.
Component to be used on the elastic.io platform, which is able to convert XML to and from JSON.
### Purpose
This component has 3 actions allowing users to pass in either generic but well format XML/JSON string or XML attachment and produces a generic string of the other file type. The output then can be maped and used in other components.
elastic.io iPaaS component to convert between XML and JSON data.

### How it works.
Before you can deploy any code into elastic.io you must be a registered elastic.io platform user. Please see our home page at http://www.elastic.io to learn how.
### Purpose
Allows users to convert XML attachments and strings to and from JSON
This component has 3 actions allowing users to pass in either generic but well format XML/JSON string or XML attachment
and produces a generic string of the other file type. The output then can be maped and used in other components.

### Requirements
Provided XML document (for `XML to JSON`) should be [well-formed](https://en.wikipedia.org/wiki/Well-formed_document) in order to be parsed correctly.
You will get an error otherwise.
Provided XML document (for `XML to JSON`) should be [well-formed](https://en.wikipedia.org/wiki/Well-formed_document)
in order to be parsed correctly. You will get an error otherwise.

#### Environment variables
No environment variables need to be set.

Expand All @@ -21,30 +20,23 @@ No environment variables need to be set.
### XML to JSON
Takes XML string and converts it to generic JSON object.

#### Schemas
[input schema](lib/schemas/xmlToJson.in.json) \
[output schema](lib/schemas/xmlToJson.out.json)
### XML Attachment to JSON
Looks at the JSON array of attachments passed in to component and converts all XML that it finds to generic JSON objects
and produces one outbound message per matching attachment. As input, the user can enter a patter pattern for filtering
files by name or leave this field empty for processing all incoming *.xml files.

### JSON to XML
Takes the body of message passed into the component and converts to generic XML string

#### Schemas
[output schema](lib/schemas/jsonToXml.out.json)

### XML Attachment to Json
Looks at the json array of attachments passed in to component and converts all XML found to generic JSON object

#### Input field
**Pattern to Match Files** - enter pattern for filtering files by name or leave this field empty for processing all incoming *.xml files.

#### Schemas
[output schema](lib/schemas/xmlToJson.out.json)

#### Known limitations
- The maximum size of incoming file for processing is 5 MiB. If the size of incoming file will be more than 5 MiB, action will throw error `Attachment *.xml is to large to be processed my XML component. File limit is: 5242880 byte, file given was: * byte.`.
- Action does not support local agents due to current platform limitations.
Treats incoming message body as JSON and converts it to a generic XML string.

## Known limitations
- The maximum size of incoming file for processing is 5 MiB. If the size of incoming file will be more than 5 MiB,
action will throw error `Attachment *.xml is to large to be processed by XML component. File limit is: 5242880 byte,
file given was: * byte.`.
- `XML Attachemnt to JSON` action does not support local agents due to current platform limitations.

## Additional Info
Icon made by Freepik from www.flaticon.com

## License

Apache-2.0 © [elastic.io GmbH](https://elastic.io)
Icon made by Freepik from www.flaticon.com