Posted: Thu Aug 22, 2002 5:15 am Post subject: Dealing with special character in MQSI flow
Newbie
Joined: 22 Aug 2002 Posts: 3 Location: Atlanta
Special characters entered in the reference fields in the XML message and MQSI do not process properly. Here is the example i am passing e.g. A word entered with an apostrophe --Kashif's -- is written on the output label as "Kashif'S")
Is there any way i can pass this ' (Kashkf's car)in a XML message and get it out as kashif' car in out put message.
Thanks
kriaz@ups-scs.com _________________ Kashif Riaz
kriaz@ups-scs.com
Joined: 01 Aug 2001 Posts: 88 Location: Pune, India
Quote:
Is there any way i can pass this ' (Kashkf's car)in a XML message and get it out as kashif' car in out put message.
Well, if you are creating the input XML using some standard XML parser (like SAX or DOM or Xerces) ' will come as ' only and you need not to worry about it becasuse MQSI flows can handle this escapse sequence. Infact if you somehow send a ' in the XML message instead of ' the MQSI flow will fail in message parsing.
If your output message is also in XML format, you will get the escapse sequence ' for ' but it should not be a problem as long as you are using a proper XML parser to parse and consume the output XML because as I said earlier XML parsers can handle such escapse sequences and the pareser will return the desired value (kashif's car) to you program (not kashif's car). But if you are treating the output XML as a plain string and trying to get the desired values out of it by doing some string operations on it, you need to program for interpreting the escape sequence ' as ' (but I believe you won't be doing so, why to do the XML parsing by yourself when you have some parsers available). If you want to avoid the use of escape sequences, you can you CDATA sections in your input XML.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum