Re: [xml] Problems with the character & and saving/loading XML files



On Fri, Apr 19, 2002 at 04:44:41PM +0200, Philip Van Hoof wrote:
On 2002.04.19 15:20 Daniel Gehriger wrote:


The following two characters must be escaped: '<' and '&'.
You could also use a CDATA section, like this:
<mydata><![CDATA[   ANY DATA   ]]></mydata>
, but then you mustn't use "]]>" inside the CDATA section, and there's
no way to escape this sequence. You better don't use CDATA for this
reason.  Here's a link with more information:

http://www.w3schools.com/xml/xml_cdata.asp

Okay, thanks a lot..
How do I use <![CDATA[ in the libxml ? When I do something

 tree.h 

xmlNodePtr      xmlNewCDataBlock        (xmlDocPtr doc,
                                         const xmlChar *content,
                                         int len);

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]