--- title: "XML Actions" slug: "xml-actions" description: "This is a list of actions that can be used in RapidIdentity Connect to interact with XML within the data." tags: ["RapidIdentity ", "Connect", "XML", "Actions"] updated: 2022-06-03T14:02:21Z published: 2022-06-03T14:02:22Z canonical: "help.rapididentity.com/xml-actions" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # XML Actions ## XML Actions ### parseXML Parse serialized XML. | Property | Value | Description | | --- | --- | --- | | xmlString* | text, expression, variable | a String, InputStream, or Reader containing serialized XML | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # Parse the XML so we can retrieve the desired data parsedXML = parseXML(individualrecord['data']) ``` ### stripXMLNamespaces Returns a copy of the XML with the namespaces removed. | Property | Value | Description | | --- | --- | --- | | xml* | expression, variable | the input XML | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # Remove all erroneous XML Name Spaces individualRecord['data']= stripXMLNamespaces(individualRecord['data']) ``` ### toXML Convert Objects, Records, Arrays, etc. to XML. | Property | Value | Description | | --- | --- | --- | | object* | expression, variable | the Object, Record, Arrays, etc to convert | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript data = toXML(record) ``` ### xpath Evaluate an XPath 1.0 expression against XML and return an XMLList containing the results. | Property | Value | Description | | --- | --- | --- | | expression* | text, expression, variable | the XPath 1.0 expression | | xml* | expression, variable | the XML | | namespaces | expression, variable | an Object or Record that maps namespace prefixes to URIs | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript requestID = xpath("ec2:requestID", data, varNamespaces) ``` ### xslt Transform XML using XSLT 1.0. | Property | Value | Description | | --- | --- | --- | | stylesheet* | text, expression, variable | Path the the XSLT stylesheet | | xml* | expression, variable | the input XML | | parameters | expression, variable | an Object or Record containing named stylesheet parameters | | returnVariable | expression, variable | name of the variable to be assigned to the return value | ```actionscript # --Sample Action Set Showing Output of DSML 1.0 (XSLT Version)-- # # map the dsml namespace dsml = new Namespace("http://www.dsml.org/DSML") # get records from DT file input = openDelimitedTextInput("demodata/sample.csv", "LastName,FirstName,Title,Email,Work,Fax,Mobile,Description") # convert to generic XML inputXML = toXML(input) log(inputXML) # convert generic XML to DSML using stylesheet varDSML = xslt("demodata/dsmloutput.xsl", inputXML) log(varDSML) saveToFile("/tmp/output.dsml", varDSML) close(input) ``` ### demodata/dsmloutput.xsl ```actionscript ```