Active |
---|
This application does not need additional settings. So you can make connectionUnique, active service acces point to a network. There are different types of connections (API key, Oauth…). only by using your login credentials or by following the instructions below . |
The XML app enables you to:
-
parse an XML formatted text via the XML > Parse XMLmodule and convert it to a bundleA bundle is a chunk of data and the basic unit for use with modules. A bundle consists of items, similar to how a bag may contain separate, individual items. to make the data available to other modules
-
convert a bundle to an XML formatted text via the XML > Create XML module
The XML > Parse XML module parses an XML formatted text and outputs a single bundle containing all the information extracted from the XML.
Data structureWhen you create a data store, you need to create a data structure that formats your data store in Boost.space Integrator. Think of the data store as a spreadsheet and the data structure as the headers. The data structure defines the kind of data (i.e. text, numeric, etc.) that the data store records. You can view and manage your data... |
The Data structure describes the structure of the XML to make the output of the module available in the mappingMapping links the modules in your scenario. When you map an item, you connected the data retrieved by one module to another module to perform the desired action. For example, you can map the email address and subject lines from the Email > Watch emails module to Google Sheets > Add a row and create a spreadsheet of email addresses... panel for the following modules. If you have a sample of the XML you would like to parse, you can use it to generate the Data structure:
|
|||
XML |
The XML formatted text you would like to parse.
|
A typical use case is to download an XML file from a URL and parse its content. Here is a step by step guide how to achieve this:
-
Create a new scenarioA specific connection between applications in which data can be transferred. Two types of scenarios: active/inactive.
-
Insert HTTP > Get a file module
-
Open the module’s configuration and configure it as follows:
URL
URL of the XML file (e.g.
https://siftrss.com/f/rqLy05ayMBJ
) -
Close the module’s configuration.
-
Add XML > Parse XML module, connect it after the HTTP > Get a file module and configure it as follows:
By default, the XML > Parse XML module will put attributes in a special collection _attributes
as a child of the node, that has these attributes. If the node is a text node and it has attributes, then two special properties will be added: _attributes
for attributes and _value
for the text content of the node.
The XML > Create XML module converts a bundle to an XML formatted text.
Data structure |
The Data structure describes the structure of the resulting XML. If you have a sample of the XML you would like to create, you can use it to generate the Data structure:
|
A typical use case is to transform data from a Google spreadsheet into XML. Here is the procedure on how to transform the data to an XML file in ten steps:
-
Place the Google Sheets > Select rows module in your scenario to fetch the data. Setup the module to retrieve rows from your Google spreadsheet and set the Maximum number of returned rows to a small number, but larger than one for testing purposes (e.g. three). Execute the Google Sheets module (right-click it and choose “Run this module only”) and verify the output of the module.
-
Connect the Array AggregatorWhen designing a scenario, use an array aggregator to merge multiple bundles into one single bundle. This may be necessary to format data properly for subsequent modules. The array aggregator also lets you define your target data structure. module after the Google Sheets module. In the module’s setup choose the Google Sheets module in the Source node field. Leave the other fields as they are for the moment.
-
Connect XML > Create XML module after the ArrayWithin a bundle, data items of the same type are sometimes in an array. You can find an array by looking at the details of a bundle. Depending on the details of your scenario, you can map other modules to a specific item in an array or use iterators and aggregators to manipulate your data into other formats. When mapping,... Aggregator module. The module’s setup requires a Data structure that describes the structure of the XML output. Click on Add to open the Data structure setup. The easiest way to create this Data structure is to generate it automatically from an XML sample. Click on Generator and paste your XML sample to the Sample data field:
-
Click on Save. The specification field in the Data structure setup should now contain the generated structure.
-
Change the name of your Data structure to something more specific (e.g. “My XML data structure”) and click on the Save. If everything goes well, a field corresponding to the root XML element should appear as a mappable field in the XML module’s setup.
-
Click on Map next to the field and map the
Array[]
item outputted from the Array aggregatorYou can use a table aggregator to create a table from multiple bundles. The table aggregator merges values based on your specified column and row parameters and outputs into a single bundle. One possible use is compiling blog posts or emails into a single email summary. module to it: -
Click on OK to close the XML module’s setup.
-
Open the setup of the Array AggregatorAn aggregator is a type of module that allows you to merge multiple bundles into one single bundle. Aggregators are useful in making data readable for certain modules or generating meaningful output. Boost.space Integrator offers:
Array aggregator
Numerical aggregator
Table aggregator
Text aggregator
module. Change the target structure from Custom to a XML module’s field corresponding to the parent XML element. Map items outputted from the Google Sheets module to appropriate fields: -
Click on the OK to close the Array Aggregator module’s setup.
-
Run the scenario. If everything goes well, the XML module should output the correct XML file. Open the setup of the Google Sheets module and increase the Maximum number of returned rows number to be larger than the number of rows in your spreadsheet to process all the data. The resulting XML can be then saved to Dropbox, sent as an attachment via email, uploaded via FTP to a server, etc.
If you want to add attributes to a complex node (a node, that will contain other nodes), you have to add a collection with the name _attributes
for this node in your custom Data structure, and this collection will be mapped to node attributes
If you want to add attributes to a text node (example: <node attr="1">abc</node>
), you have to add a collection _attributes
for attributes and a text property _value
for the node value for this node in your custom Data structure.