Top
Top
LibraryEASYProcess Reference ManualProcessesServicesXmlWorkshopLoadFromString

LoadFromString Overview

LoadFromString will attempt to interpret a given input string as an XML document, and (if successful) return a string that represents the valid XML document.  This can be useful for standardizing XML strings into a valid and consistent format which EASYProcess can reference.

If ever you want to manipulate XML in your services in EASYProcess and the XML ends up evaluated as a string instead, this service can be used to force EASYProcess to read it as XML. This will build the XML tree in the logs and allow future services to reference those nodes and perform actions on them such as indexing, sorting, filtering, etc.


LoadFromString Use Examples
Workshop:XmlWorkshop
Service:LoadFromString
Inputs
XmlDataThis data represents a valid XML document structure that is to be loaded as an XML document by this service.

RemoveNameSpaceIf this processing flag is true, then the input XmlData node will have any and all namespace declaration nodes stripped before being loaded as an XML document.

Outputs
XmlDataA string which represents the loaded XML's document element and all children of that element, as derived from the input node XmlData.

LoadFromString Use Example

Basic LoadFromString Use

For this example, we will use the input string: “<Document></Document>”

Process Structure

LoadFromString Service Input

Once run, the process will read in the input string and copy its contents into an output node; preserving the XML structure, and wrapping it within the output node.

Output

Referencing the Resulting XML

In this example, in the LoadFromString input we placed a SOAP API response. This will have values we want to reference later.

Once the service runs, we can view the xml tree in the logs.

Using this we can reference the output from LoadFromString and build a label to display tax information on the page. That label is created in an evaluate. Here is the evaluate service configuration and logs.


Powered by EASYProcess (© 2019 K-Rise Systems, Inc).