Page 1 of 1

XML to Text Service

Posted: June 16th, 2022, 10:23 am
by JefferyD
I want to be able to take an XML node and convert it to a value. Is there a way to do that?

There is the ConvertNodeValueToXml service that attempts to parse a node value as XML and converts it in place. That's helpful for CreateServiceNode services. So is there a similar service to do the reverse?

Example:
I'm using XSLT in a CreateServiceNodeFromXml to generate XHTML inside of a "GeneratedHTML" node, but I want the HTML content to be text for the rest of my logic.

Using the below code in a CreateServiceNode seems to work, but that forced me to update several references and I also feel that's not very intuitive.

Code: Select all

<xsl:copy-of select="WorkData/ServiceName/Output/Result/GeneratedHTML/*"/>
In this case, a way to convert XML to text like ConvertNodeValueToXml converts text to XML would have really helped out.

Re: XML to Text Service

Posted: June 16th, 2022, 3:11 pm
by SteveCap
Task #10520 has been created to create a service ConvertNodeValueToText