Store XML-String in Tag of XML-Document
06:11 16 Aug 2015

I have a Website using a Webservice(JS(Ajax) -> PHP) which uses a Webservice (ASP.NET).

If an error occures in PHP, this is sent back to the client. If PHP gets an Error(XML) from ASP, I want to pass it to the client in a tag of my PHP-XML-error to offer further information.

So for example:

 

  It's not my fault!

     
       
      
        
        
      
    

I want the Client (Client uses a XML-Reader) to treat this

       
      
        
        
      

like a string. (Probably parsing that string later, Like: Parse the message, take tag "asperror", parse the asperror). So my first attempt was this:

 

  or whatever

      
      
        
        
      
      ]]>
    

It didn't work, and I checked it with the code-highlighting of Notepad++. Everything was considered a string, except


This of course made the xml invalid. So: how else can I solve this? If possible I don't want to have to process the ASP-XML in PHP.

xml web-services