Does it have to be xpath? I know I can do it in xslt, but I don't think it's possible with xpath.
<xsl:value-of select="string(.)" disable-output-escaping="no" />
It worked but i am getting xml declaration in output .. <?xml version="1.0" encoding="UTF-8"?> ... can i remove it in any way
Maybe you can put the output through another basic xml to string transform?
2 of 2 people found this helpful
I guess a quick and dirty way of doing what you'd like to achieve would be to extract the text of each line separately and then concatenate the results.
For extraction of single lines something like //line[@index="2"]/text() would work.
Save that to a configuration item, repeat for the remaining lines and finally use an assign activity, where you can insert linefeeds inbetween configuration items. Here's an example of what I mean.
Keep in mind though that, should you go for this approach, it is rather unstable since the extraction relies on line indices or in other words an output very similiar to what you gave as an example.
1 of 1 people found this helpful
another option (if wanting to use XPATH) is to use a "Basic" transform and select the "To Text - Multiple Line" option (or similar) in the String utilities.
If wanting the exact XPATH, you can look at the PDL output from the workflow that will show you exactly what the basic operations are in their XPATH equivalents.