Rule of thumb: In the "Script Functoids - Inline C#" use only string types as the input and output parameters. How it works: If the C# method in the Script Functoids - Inline C# has non-string parameter, it will be converted to the string on the "border" of this functoid! Take in mind that the "real" type for Xml elements is "string", no matter how it was defined in the Schema. Xml only mimics the other types. The Xml holds the values serialized to string and vice versa. In our case the string "1"...