3 Replies Latest reply: Feb 25, 2013 1:23 AM by 958367 RSS

    How to remove XML declaration /space  while publishing message to a queue.

    958367
      Hi All,

      We got a requirement to remove space from XML Declaration tag while publishing data to a queue.Actually When we are publishing data to a queue the format is like this:

      <?xml version="1.0" encoding="UTF-8" ?>
      <ns1:source_group xmlns:ns1="http://tempuri.org/sample/inputaddress">
      <ns1:FirstName>ABC</ns1:FirstName>
      <ns1:PhoneNumber>1234</ns1:PhoneNumber>
      </ns1:source_group>

      ****************************************
      We want to publish it in the below format:

      <?xml version="1.0" encoding="UTF-8"?>
      <ns1:source_group xmlns:ns1="http://tempuri.org/sample/inputaddress">
      <ns1:FirstName>ABC</ns1:FirstName>
      <ns1:PhoneNumber>1234</ns1:PhoneNumber>
      </ns1:source_group>

      I mean we want to remove space which is coming before ? in the XML declaration tag.
      Do we have any partnerlink property to overcome this problem .Or is there any way if we can remove the complete XML declaration tag .Actually my problem will get resolve by removing the space before ? or complete XML Declaration tag from the message.

      Please help,If someone has faced same problem.

      Thanks,
      Shailendri