|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
& inside XML message |
« View previous topic :: View next topic » |
Author |
Message
|
WBI_user |
Posted: Wed Sep 12, 2001 6:49 am Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
I have these ESQL in a compute node of a simple flow (MQINPUT->COMPUTE->MQOUTPUT):
SET INPUTMSG = InputRoot.XML."MESSAGE" ; SET RESULT = '12345'
SET OutputRoot.XML.RESULT.DATA.(XML.AsisElementContent) = RESULT || INPUTMSG ;
It works fine with input message
<MESSAGE>123456789ABCDEFG</MESSAGE>
It fails when the input message is
<MESSAGE>123456789&ABCDEFG</MESSAGE> (with & inside the message)
The error message in the user trace is
ParserException BIP5004E: An error has been reported by the BIPXML4C
component: code '65601'; public id ''; line number '1'; column number
'27'; current element 'MESSAGE'; error text 'Unterminated entity reference'.
The above error was reported by the XML parser.Check that the XML
message is well-formed and that it adheres to the XML specification.
I know that '&' is a special character for XML. How should I handle it when the input
message contains '&'
[ This Message was edited by: Kelvin Yung on 2001-09-12 07:53 ] |
|
Back to top |
|
 |
Outdesign |
Posted: Mon Sep 17, 2001 3:22 am Post subject: |
|
|
Apprentice
Joined: 16 Sep 2001 Posts: 38 Location: Hampshire, UK
|
Use the correct XML escape sequence :
& ampersand, &
< left angle bracket, <
> right angle bracket, >
' single quote character (an apostrophe), '
" double quote character, "
123456789&ABCDEFG |
|
Back to top |
|
 |
Outdesign |
Posted: Mon Sep 17, 2001 3:25 am Post subject: |
|
|
Apprentice
Joined: 16 Sep 2001 Posts: 38 Location: Hampshire, UK
|
Hopefully the formatting will come out better here ...
Use the correct XML escape sequence :
& ampersand, &
< left angle bracket, <
> right angle bracket, >
' single quote character (an apostrophe), '
" double quote character, "
<MESSAGE>123456789&ABCDEFG</MESSAGE> |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|