ContributionsMost RecentMost LikesSolutionsRe: Covert HTML to Plain Text Shucks… vaidyarm had it right all this time. I had tried that with .replaceAll() and it didn’t work; but with .replace() like you both said… works. I would not have expected to use .replace() to strip ALL the tags. Live and learn. Thank you both - Davey Re: Covert HTML to Plain Text Yup, that’s what I did on my 2nd attempt. For anyone else experiencing this problem… this is the expression I wrote for our library to strip (at least) the HTML that I am seeing; might need more tags added to it. { stripHTML: x => x.replaceAll(x.slice(x.indexOf("<b"),x.indexOf(">",x.indexOf("<b"))+1),"").replaceAll("</b>","").replaceAll(x.slice(x.indexOf("<span"),x.indexOf(">",x.indexOf("<span"))+1),"").replaceAll("</span>","").replaceAll(x.slice(x.indexOf("<i"),x.indexOf(">",x.indexOf("<i"))+1),"").replaceAll("</i>","").replaceAll(x.slice(x.indexOf("<u"),x.indexOf(">",x.indexOf("<u"))+1),"").replaceAll("</u>","").replaceAll(x.slice(x.indexOf("<br"),x.indexOf(">",x.indexOf("<br"))+1),"").replaceAll("</br>","").replaceAll("<br>","").replaceAll(x.slice(x.indexOf("<font"),x.indexOf(">",x.indexOf("<font"))+1),"").replaceAll("</font>","").replaceAll(x.slice(x.indexOf("<html"),x.indexOf(">",x.indexOf("<html"))+1),"").replaceAll("</html>","").replaceAll(x.slice(x.indexOf("<body"),x.indexOf(">",x.indexOf("<body"))+1),"").replaceAll("</body>","").replaceAll(x.slice(x.indexOf("<head"),x.indexOf(">",x.indexOf("<head"))+1),"").replaceAll("</head>","").replaceAll(x.slice(x.indexOf("<meta"),x.indexOf(">",x.indexOf("<meta"))+1),"").replaceAll("</meta>","").replaceAll(x.slice(x.indexOf("<style"),x.indexOf(">",x.indexOf("<style"))+1),"").replaceAll("</style>","").replaceAll(x.slice(x.indexOf("<!"),x.indexOf(">",x.indexOf("<!"))+1),"").replaceAll("</!>","").replaceAll(x.slice(x.indexOf("<div"),x.indexOf(">",x.indexOf("<div"))+1),"").replaceAll("</div>","").replaceAll(x.slice(x.indexOf("<p"),x.indexOf(">",x.indexOf("<p"))+1),"").replaceAll(x.slice(x.indexOf("<div"),x.indexOf(">",x.indexOf("<div"))+1),"").replaceAll("</div>","").replaceAll("</p>","").replaceAll("//r","").replaceAll("<div>","").trim() } Re: Covert HTML to Plain Text Ha… this website is rich text, and renders the HTML tags instead of showing them to you. 😉 Let’s try this: Convert THIS… <html>\r\n<head>\r\n<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\r\n<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>\r\n</head>\r\n<body dir="ltr">\r\n<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">\r\n<p></p>\r\n<div>This<br>\r\nis<br>\r\na<br>\r\nplain<br>\r\ntext<br>\r\nbody?</div>\r\n<p></p>\r\n<p><br>\r\n</p>\r\n</div>\r\n</body>\r\n</html>\r\n … to plain text. Re: Covert HTML to Plain Text That doesn’t do the trick. What me and the originator Drew are looking for it a way to transform this… \r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n This \r\nis \r\na \r\nplain \r\ntext \r\nbody? \r\n \r\n \r\n \r\n \r\n\r\n\r\n …into this… This\r\nis\r\na\r\nplain\r\ntext\r\nbody?\r\n In other words, we don’t need to decode… we need to strip all of the HTML tags. Does anyone know an easy way to do this in SnapLogic? Otherwise, I the only option seems to be to build a library that knows how to do it. But someone else must have already invented that mouse trap, eh. Thanks - Davey Re: Format to XML in an Ultra Pipeline? Ha… I figured it out. The error said to verify that the document is XML convertible… so I played around with my mapping in the preceding Mapper snap. I added a common root to call of my fields… “1.”… and that satisfied the XML Formatter snap. Its always simple once you know what to do. 😉 Regards - David. Re: Format to XML in an Ultra Pipeline? T, thanks for responding! No, not separate documents input. Just multiple fields. Here is a screenshot of my input JSON… … an here is my errored XML Format snap. “IncidentDescription” is my second field on the input side. ☹️ Format to XML in an Ultra Pipeline? Has anyone been able to format multiple input fields into XML in a pipeline that will be executed via an Ultra task? I attached a screenshot of my pipeline. In the highlighted XML Format snap, if I clear the Root Element field (as required by the instructions for building an Ultra pipeline), I get an error when it runs; it appears it needs a root element in which to place my many input fields. However, when I add a Root Element of “DocumentRoot” to that snap… the pipeline fails when run by Ultra. I conclude that we cannot format multiple inputs into XML when run via Ultra… but I’m hoping there is some other way to accomplish my goal. My overall need is… I capture whatever (it can vary alot) JSON elements are input to me, store them in an XML field in our SQL Server database, to be retrieved/parsed later. Thanks in advance - David.