You must Sign In to post a response.
  • Category: BizTalk

    NonValidXmlCharecters

    <pre lang="xml">How to Pass NonValidXmlCharecters in biztalkserver?


    Here iam using scripting functiod to pass NonValidXmlCharecters

    In scipting functiod Iam using inline c#:
    below following code i have written but it is not sending some non valid charecters

    public String stripNonValidXMLCharacters(String in)
    {
    StringBuilder out = new StringBuilder();
    char current;
    if (in == null || ("".equals(in))) return "";
    for (int i = 0; i < in.length(); i++)
    {
    current = in[i];
    if ((current == 0x9) ||
    (current == 0xA) ||
    (current == 0xD) ||
    ((current >= 0x20) && (current <= 0xD7FF)) ||
    ((current >= 0xE000) && (current <= 0xFFFD)) ||
    ((current >= 0x10000) && (current <= 0x10FFFF)))
    out.append(current);
    }
    return out.toString();
    }


    Data iam sending as input is: "dsdfjhdskjjdkldskjd",hdjgshsg#*jhj%@&;"

    </pre>

    --
    Thanks&Regards
    ReddyGariVamshedharReddy
  • #571053
    Hi,

    if you want to remove more invalid XML characters then add the required invalid chars. include the invalid chars in the checking.

    Thanks & Regards
    D.Jeya Kumar(JK)


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.