Announcement

Collapse
No announcement yet.

XML Source - Removing Characters?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • XML Source - Removing Characters?

    Hi All,
    How would one remove certain characters from XML to Text file?

    I need to remove the characters of <, >, / and “ from Source to Destination.

    I've tried this in both Preprocessor and the Destination Transformer using:

    var outputText = inputText.replace( /<|>|\/|"/g, "" );

    However, I do not know if replace is a method XML, anyway it does not work.

    Any ideas out there?

    Thank you,

    Rubi

  • #2
    one possible way is to use the traditional approach like parsing the xml and construct the output as whatever the way you want ?
    Mirth Certified

    Comment


    • #3
      Originally posted by satheeskumar View Post
      one possible way is to use the traditional approach like parsing the xml and construct the output as whatever the way you want ?
      I'm really not sure on how to do that. Can you explain more in detail? it's XML.. I'm not to savvy with XML.

      Comment


      • #4
        hi,

        I am also not expert with JavaScript, but there are examples in available to parse using DOM with javascript.

        write a javascript function which does your job in Globel code template and use it.
        Mirth Certified

        Comment

        Working...
        X