xmlTreeNewCDATA

SYNOPSIS

xmlNode xmlTreeNewCDATA(xmlNode parent, string content)

Parameters:

  • parent - the parent of the new CDATA section (can specify none with '')

  • content - the content for the new CDATA section

Returns:

  • the xmlNode for the new CDATA section


DESCRIPTION
xmlTreeNewCDATA() creates a new CDATA block, which is a block of text that goes unparsed by the XML parser. See http://www.w3.org/TR/2006/REC-xml-20060816/#sec-cdata-sect for more information on CDATA sections.


EXAMPLE

<$cdata = (xmlTreeNewCDATA($node,
        'I go unparsed! <<<<<< Nya nya!'))>

Will produce the following in the output:

<![CDATA[I go unparsed! <<<<<< Nya nya!]]>


SEE ALSO
xmlTreeNewElement, xmlTreeNewPI, xmlTreeNewText, xmlTreeNewComment


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.