« Return to Thread: Sending XML containing html tags

Sending XML containing html tags

by Rafael Escote :: Rate this Message:

Reply to Author | View in Thread

Dear folks, i'm trying to build a correct AJAX (using RICO js libs)
response from 4D, so i'm building an
XML document using the DOM commands and sending it via
SEND HTML BLOB.
However I've found that if the response text includes
some tags to format the html page
the result is not the one desired. For example:

// Test response
$answer:="<span>Testing</span>"

$myxml:=DOM Create XML Ref("ajax-response")

DOM SET XML OPTIONS($myxml;"ISO-8859-1")

$elem:=DOM Create XML element($myxml;"/ajax-response/
response";"type";"element";"id";"myObject")

DOM SET XML ELEMENT VALUE($elem;$answer)
DOM EXPORT TO VAR($myxml;$result)
DOM CLOSE XML($myxml)
...
SEND HTML BLOB($result;"text/xml")

The sent text is always translating the tag <span> into
somthing like:
<span>Pepe</span>

Being an XML, BLOB ignorant I'm not sure what i'm doing wrong...
Any help?
TIA
--
Rafael Escoté
BlauSoft s.l.


**********************************************************************
The 4D v11 SQL Roadshow - coming to a city near you!
http://www.4D.com/roadshow/index.html

4th Dimension Internet Users Group (4D iNUG)
FAQ:  http://www.4d.com/support/faqnug.html
Archive:  http://dir.gmane.org/gmane.comp.lang.inug-4d.tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
Post: mailto:4d_tech@...
Options: https://lists.4d.com/mailman/listinfo/4d_tech
**********************************************************************

 « Return to Thread: Sending XML containing html tags

LightInTheBox - Buy quality products at wholesale price