Removing HTML from CCD Nodes

136 Views Asked by At

We've got an inbound CCD. Within some of the content nodes, there are instances of <br/> tags followed by text. Unfortunately, when the XML is processed, it seems as if the <br/> tags are causing the text that follows to be lost completely.

We are trying to remove those tags prior to processing, but are having issues getting that to work. We have tried setting the Attachment property of the channel to remove the tags (i.e., Replace All = <br/>, Replace With = ""), but it had no effect.

Here is a sample node:
<content ID="MEDSIG252044747">
<br/>
81 mg 1 tab, PO, Every Day <--This line is being removed when processed
</content>

How can we get rid of the <br/> tag during pre-processing?

1

There are 1 best solutions below

0
agermano On

It would be helpful if you shared your code that lead you to believe the text is missing, but you can likely ignore the <br/> elements like this:

var contentNode = msg..content; // or however you'd normally get to this node
// concatenate all child nodes of content with type text
var content = contentNode.text().toString();