Save session data action in XML

The Save session data action in the XML package enables you to save the XML session data to a file or variable of type String.

Settings

Session data is an entity used to save session context information. You can save the session to assign the current state of the XML data to a file or a variable.

  • Enter the session name or select an existing variable used in the Start XML session action.
  • To save the session data to a file, select the Write XML data option and specify a file path.
  • Select Overwrite to replace the existing file if a file with the same name exists in the location you have specified.
  • Select the Use Prettyprint check box to format your code with proper indentation as per Prettyprint.
    Note: By default, it uses a 2-space indentation and does not add XML document declaration explicitly.
    Use Prettyprint feature works effectively when:
    • The source XML document supports the linearization of a tree structure.
    • You select the Remove text nodes that contain only white space check box in the Start session action.
    Note:
    • If the source document is already formatted, you do not have to select the Use Prettyprint check box.
    • When you migrate bots from Enterprise 11 to Automation 360 that are using the Save session data action, the Use Prettyprint check box is selected by default.
  • Assign the output to a String-type variable.
Note: The session data will be saved if you select the Write XML data option.