Re: [xml] CDATA

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Thu Dec 09 1999 - 11:01:59 EST


On Mon, Dec 06, 1999 at 04:43:14PM +0100, Stephane Conversy wrote:
>
> Stephane Conversy wrote:
>
> > by the way, how to get the text in a CDATA section ?
> >
>
> ok it's just a matter of xmlNodePtr->current...
>
> for my information: given the fact that we have a 'content' field,
> why should we use xmlNodeListGetString ?
>

  Because entities references are usually not converted directly
as text (otherwise one would loose information when writing an xmlDoc back).

http://xmlsoft.org/gnome-xml-tree.html#XMLNODELISTGETSTRING

"Returns the string equivalent to the text contained in the Node list made
of TEXTs and ENTITY_REFs"

This function substitutes the entities by their content and
coalesce the result in one string (without modifying the DOM tree).

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
Message from the list xml@rufus.w3.org
Archived at : http://rufus.w3.org/veillard/XML/messages
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rufus.w3.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:53 EDT