Read XML

This activity retrieves values from an XML document. There are a variety of ways to define the XML document.

ClosedHow does this activity look in the Designer Pane?

To add this activity to a workflow definition

To configure this activity

Select the activity in the Designer Pane to configure the following property boxes in the Properties Pane.

See the following options:

Example: The response from an HTTP Web Request activity is an XML document that contains an element or attribute with a Laserfiche document ID. A Read XML activity can retrieve this document ID for use in a later step in the workflow.

Important: The Read XML activity supports XPath 1.0.

Well, before anything, the usecase depends on the source of the Xml string itself... there are many ways for the user to get an Xml string that they might want to parse. For example, the string can come from these places:

HTTP Web Request Activity, as part of the response (which will be in html) - this is the most likely case, by far, I'd think

A LF Document which contains something in Xml - not sure how likely this case might be, but i can imagine some forms might be in xml format

A user can read a file from disk that's in xml and use the activity to parse that file - this case is not very likely because WF is not great with file systems yet

User will use a Write Xml activity to create xml... after manipulating the xml, they can read it thru Read Xml - We are forgoing the Write Xml activity for 9.1 but it will be around later... at this point, they can, as you mentioned, use Create Token Activity to create Xml (although it's a very bad UI for that)

A side case, but I imagine power users may end up using Xml to store data instead of having multiple tokens, since they can use Read Xml to parse thru that with some ease - this is a "power use" case and not sure if it'll happen but it's worth considering

there are probably other sources where the user can probably get Xml strings they might want to read. The case that I see as the most meaningful, at the moment, is to get useful information out of the new Http activities, since the response is in xml form

another usecase is that, whether through Scripts, Custom Activities or Http activity, users integrating with 3rd party APIs will very often get responses in html. If they wrote custom activites and scripts, chances are they manage these responses thru their respective scripts, but having the ReadXml activity is very useful for them because they can just output the response as a string and parse it through the activity, making it easier to interact with the 3rd party API (for example, they dont need to recompile the Custom Activity every time they want to parse some new kind of response)