Problem in Saving MSMQ message as a XML File

logu_cbelogu_cbe Member Posts: 54
Hi guys,

While i am tring to load a MSMQ XML message, it is saving the XML file with the tag <String>.

Can any of you having idea to solve this?

My Code Bit:

CC2::MessageReceived(VAR InMessage : Automation "''.IDISPATCH")
//Get the Message
InMsg := InMessage;
InS := InMsg.GetStream();

//Load the message into an XML document and find a node
IF NOT ISCLEAR(XMLDom) THEN
CLEAR(XMLDom);
CREATE(XMLDom);

XMLDom.load(InS);
XMLDom.save('C:\TestXml.xml');
........................

XML File saved as
<?xml version="1.0" ?>
<string><?xml version='1.0' encoding='utf-8'?><inventory><item><id>0</id><itemcode>IT0001</itemcode><availability>0</availability></item></inventory></string>

Thanks in Advance,
Logu

Comments

  • BgestelBgestel Member Posts: 136
    take a look at the messag while it is still on the que, so stop youre nav cu.

    put a msg on the que and look at it with the manager.

    i suspect that the app that is sending the xml messages is putting the string tag in
    **********************
    ** SI ** Bert Van Gestel **
    **********************
Sign In or Register to comment.