With the workflow component, Resource to workflow variable (which is a shortcut component of the other category), you can read a resource from the library and store it in a workflow variable. A related component is: From file to workflow variable.
The component has these parameters:
You can verify the contents of the variable afterwards e.g. with the debug headers component.
A common use case for the "resource to workflow variable" component, is to merge two or more XML files with an XSL transformation. In this case you could have one XML as the payload and the others as workflow variables.
For instance if you read the second XML into a workflow variable "SecondXML", then you can append that with the payload with this transformation:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:param name="SecondXML"/> <xsl:template match="/"> <root> <!-- Parse and insert the second XML --> <xsl:copy-of select="fn:parse-xml($SecondXML)"/> <!-- Copy the current input XML root node --> <xsl:copy-of select="."/> </root> </xsl:template> </xsl:stylesheet>