Jump to content


Photo

HTML in XML document


  • Please log in to reply
1 reply to this topic

#1 toolman

toolman

    Advanced Member

  • Members
  • PipPipPip
  • 144 posts

Posted 04 December 2013 - 06:17 AM

Hi,

 

I am trying to insert some HTMl into an XML document, but its not working. I am trying to add it in the <your_message> tag.

 

Any ideas how I can do this?

 

<?xml version="1.0" encoding="UTF-8"?>
<your_card>
    <your_message>
    my message here
    </your_message>

</your_card>

 

Thanks



#2 Ch0cu3r

Ch0cu3r

    Advanced Member

  • Moderators
  • 1,693 posts

Posted 04 December 2013 - 10:02 AM

Wrap the html within CDATA sections.

<?xml version="1.0" encoding="UTF-8"?>
<your_card>
    <your_message>
    <![CDATA[
           your html here
    ]]>
    </your_message>
</your_card>

Edited by Ch0cu3r, 04 December 2013 - 10:03 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com