hexadecimal 0x40

Home Page Forums BizTalk 2004 – BizTalk 2010 hexadecimal 0x40

Viewing 1 reply thread
  • Author
    Posts
    • #14710

      Maybe you need to URL Encode it first. Make the @ a %40 I think.

      You could use a helper .net component to do that.

      Not real sure if that will work and it might cause you other problems down the road.

    • #14711

      What is xFrom?

      • #14712

        This higihlights one of the problems of building your own Xml usng strings rather than an Xml parser.
        When you assign a string value to a node using a parser it should be automatically excaped.
        i.e. John Walker<john.walker@gmx.com> becomes John <return>Walker&lt;john.walker@gmx.com%gt;</return>

        This will makes handling the Xml much easier than using CDATA
        To do this:
        [code:1:aad87f017b]xDoc.LoadXml(\"<ns0:returnValue xmlns:ns0=’http://LeadMgmtEmail.returnValue’><return/></ns0:returnValue>\");
        xMessage = xDoc;
        xpath(xMessage, \"/*[local-name()=’returnValue’ and namespace-uri()=’http://LeadMgmtEmail.returnValue’]/*[local-name()=’return’ and namespace-uri()=”]\") = Email(POP3.From);[/code:1:aad87f017b]

        • #14713

          What about adding a CDATA tag around your email.
          If the email has offending data in it, this shoudl prevent the error.

          xDoc.LoadXml(\”<ns0:returnValue xmlns:ns0=’http://LeadMgmtEmail.returnValue’><return>&lt;![CDATA[
          \”+Email(POP3.From)+\”]]>
          </return></ns0:returnValue>\”);

          Can you send an example of the value of your email? Does it contain XML that has elements names with spaces in it?

          • #14714

            Hello,

            i get message from pop3 adapter and trying to access the context. While accessing header information (with Email(POP3.From)) and later assignemnt to the XmlDocument I get following error:
            \”The ‘@’ character, hexadecimal value 0x40, cannot be included in a name.\”

            Code part in message assignment:
            xFrom = System.String.Format(Email(POP3.From));

            xDoc = new System.Xml.XmlDocument();
            xDoc.LoadXml(\”<ns0:returnValue xmlns:ns0=’http://LeadMgmtEmail.returnValue’><return&gt;\”+Email(POP3.From)+\”</return></ns0:returnValue>\”);
            conEmail = xDoc;

            P.S. the conEmail is defined in a Schema, the return-tag is set to anyType.

            • #14715

              Hi all,

              the problem was, that I returned a xml schema as output of orchestration. The format of Email was e.g. John Walker<john.walker@gmx.com>

              If I put this \”string\” in a xml document then the tags will be interpreted as an extension of xml document. My solution was to search in a string for position of \”<\” and for the position of \”>\” and additionally to read the value between these to values.

              they idea with wrapping in CDATA seems to be very good. I should try it.

              tox.

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