Is there a way to include greater than or less than signs in an XML file?

前端 未结 5 593
别跟我提以往
别跟我提以往 2021-01-01 11:52

I have an XML file from a client that has greater than > and less than < signs in it and it fails an XML format check. Is there a way to get

5条回答
  •  一向
    一向 (楼主)
    2021-01-01 12:28

    The direct answer to your question:

    Is there a way to get around this without asking the client to fix the file ?

    is "no". The data you are getting is not valid XML, and you are correct in rejecting it. I highly recommend going back to the client and saying that they must provide valid XML, using Character Entity References as mentioned by David and Rahul.

提交回复
热议问题