Well, there is more escaping to do than just <. Also, watch out for CDATA sections that may appear. Maybe you can find a function that is written to stream XML out to a string. There should be one ready to use out there.
Regards,
Ali


At 01:19 AM 5/18/2006, you wrote:
Suavi,
 
Thank you very much for your remind.
What do you mean by "more escaping than just '<' "? Do you mean I also need to convert "&amp;" to "&", and etc?
I try to pass XML "<formula>a < b && c > d </formula>", the string at the service side is
"&lt;formula> a &lt; b &amp;&amp; c > d &lt;/formula>". There may be other special characters I nee to take care.
If client input is "<formula> a &lt; b &amp;&amp; c &gt; d </formula>", the service side receives "&lt;formula> a &amp;lt; b &amp;amp;&amp;amp; c &amp;gt; d &lt;/formula>"
 
So how shall I convert the passed string into original XML? Is there any tool I can use?
 
Regards,
Xinjun

 
On 5/18/06, Suavi Ali Demir <[EMAIL PROTECTED] > wrote:
Don't forget you might have xml as:
 
"<formula>X &lt; Y</formula>"
 
Now, if you process this string and make:
 
"&lt;formula>X &lt; Y&lt;/formula>"
 
When you reverse it, you will get:
 
"<formula>X < Y</formula>"
 
which is incorrect.
 
So, you will need more escaping than just "<".
 
Regards,
Ali

Xinjun Chen <[EMAIL PROTECTED]> wrote:
Hi Dies,
 
Thank you! You are right. In fact I can do that :-). Just need to replace all "&lt;" by "<". 

Regards,
Xinjun
 
On 5/17/06, Dies Koper <[EMAIL PROTECTED] > wrote:
Hello Xinjun,

Just use a String type field.
Axis will replace the '<'s and '>'s in your XML with '&lt;'s resp.
'&gt;'s, making it valid XML content.

Regards,
Dies


Suavi Ali Demir wrote:
> Why can you not embed xml inside xml?
>   Regards,
>   Ali
>
> Xinjun Chen < [EMAIL PROTECTED]> wrote:
>     As far as I know, I cannot embed XML inside XML, so how can I pass an XML document as an input parameter to a web service?
>   Could anyone provide some pointer on that?
>
>   Regards,
>   Xinjun




Reply via email to