can a valid xml body have escaped characters for the '<' and '>' around the element names

Posted by prmatta on Stack Overflow See other posts from Stack Overflow or by prmatta
Published on 2010-02-22T22:04:33Z Indexed on 2010/05/16 2:10 UTC
Read the original article Hit count: 550

Filed under:
|
|
|
|

My web service is receiving xml from a third party that looks like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
&lt;Foo&gt;bar&lt;/Foo&gt;
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

My jaxws web service rejects this with a parsing error. Also if I try to validate this xml using soapui it says Body with element-only content type cannot have text element.

My question is, is that xml valid? Or is the client supposed to send me something without escaping the < and >.

Any references to xml standards or rules are appreciated.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xml-validation