Form to XML component
The Form to XML component allows direct conversion from the Form URL-encoded format to XML. This component can be used, for example, when submitting an HTML form to a Dovetail flow.
Configuration
At the moment, there are no configuration parameters.
This component supports empty values for a given key.
- Start with a digit.
- Start with special characters such as hyphens or periods.
- Start with any variation of
xml
. - Contain special characters other than the periods, hyphens, underscores and/or colons.
Please use UTF-8 encoding for the incoming message. Add an Encoder component before the FLV component to change the encoding of the incoming message to UTF-8. You can add an Encoder component after the Form to XML component to change it back to its original encoding if necessary.
Using FLV
Conversion with valid data
See the example below for a conversion with complete and valid form data.
- Form data Input
- XML Output
first-name=Joe&last-name=Foo&age=21
<?xml version="1.0" encoding="UTF-8"?>
<item>
<first-name>Joe</first-name>
<last-name>Foo</last-name>
<age>21</age>
</item>
Conversion with invalid or missing data
See the example below for a conversion with incomplete and invalid form data.
- Form data Input
- XML Output
first-name=John&last-name=&age=25&991=porsche
<?xml version="1.0" encoding="UTF-8"?>
<item>
<first-name>John</first-name>
<last-name></last-name>
<age>25</age>
</item>
In this case, last-name
will have no value and the invalid parameter named 911
will be ignored.