To create a custom functoid to remove all special characters from a file. The file could be a flat file or XML.

Home Page Forums BizTalk 2004 – BizTalk 2010 To create a custom functoid to remove all special characters from a file. The file could be a flat file or XML.

Viewing 1 reply thread
  • Author
    Posts
    • #26192
      POC to
      create a custom functoid to remove all special characters from a file. The
      file could be a flat file or XML.
    • #26193

      You can create a custom functoid or use Scripting functoid to call a helper class method which will remove the special characters.

      You can use Regex to remove all special characters from each node.

      Each node will have its own Scripting functoid connected to  the common Helper class method.

      • #26195

        i have created a custom functiod using Regex which takes "string" as an input. I wanted to know how to apply this custom functiod to an input file

        • #26196

          Functoids are used in maps,So you can apply it to a XML node(field) in the map. You cannot directly apply it to the complete file.It will be individual node based. So if you have 10 fields(10 scripting functoid with C# code to remove the special characters) each connected to its own functoid and output to the corresponding field in the Output Schema. If the structure of the Output file  is same as input file without special caracters then the Input and Output Schemas in the map will be same as of the incoming file.

          • #26197

            thanks…Do u have any idea if the input file is not well formed..in that case how to remove the special chars?

            • #26198

              If the Input file is not wellformed means it will not match the corresponding Schema and it will fail.

              In that case you will need to create another Orchestration subscribing to the failed message and try to fix it using a .Net Helper Class method and reading each line as text and remove the special characters.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.