The CAST function can only take a scalar value as it parameter and therefore when you pass a field reference it only takes the value of that field, and not the subtree it may represent. Therefore when you specify InputRoot.XML, it takes the value of that specific field and not all the children of InputRoot.XML.
Please see the latest response in the following location for details on how to do what you require :
I should have also commented in the last update that if you want to take the whole of your input XML message then you need to use the constant RootBitStream instead of FolderBitStream in the example. Or you can just not specify the final parameter on ASBITSTREAM. _________________ Regards
Craig
If you are working with a message tree that was created by the parser at input time then the BITSTREAM function will perform the same job you require as you point out. However it should be noted for future reference that the BITSTREAM function has two limitations such that :
1) It can only produce a BLOB for a message tree if this was created by a parser at input time. Ie, the input message bitstream that was associated with a parser. It cannot produce a bitstream of a newly created message tree, because this does not have a bitstream associated with it.
2) It can only produce a BLOB for the whole of a parser message tree folder. ie it cannot produce a BLOB for specific fields and folders within the message body say.
The ASBITSTREAM function does not have these limitations. _________________ Regards
Craig
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