views:

47

answers:

1

I am trying to get the following sent in an xml.

<Request xmlns="http://abc.org/1.1/Listener.wsdl"&gt;&amp;lt;serverstatusinquiry xmlns="http://abc.org/messages"/&amp;gt;&lt;/Request&gt;

The problem I am facing is the text part of the Request node. I am printing the text as follows.

"<serverstatusinquiry xmlns=\"http://abc.org/messages\"/&gt;"

But I end up with:

&lt;serverstatusinquiry xmlns=&quot;http://abc.org/messages&amp;quot;/&amp;gt;

I understand &quot; stands for double quotes, is there a way I can force it to actually output " instead of &quot;? Is there anything wrong with what I am doing?

+1  A: 

Use &#60; for < (Less than), > &#62; for > (Greater than), and &#34; for "

<Request xmlns="http://abc.org/1.1/Listener.wsdl"&gt;&amp;#60;serverstatusinquiry xmlns=&#34http://abc.org/messages&amp;#34/&amp;#62;&lt;/Request&gt;Quotation).
Ruel