xmlWriterWriteRaw

SYNOPSIS

int xmlWriterWriteRaw(xmlWriter writer, string content)

Parameters:

  • writer - the xmlWriter

  • content - the raw content to write to writer

Returns:

  • the bytes written (may be 0 because of buffering) or -1 in case of error


DESCRIPTION
xmlWriterWriteRaw() writes the string content to writer, without applying any markup. This is useful if you have some data that is already XML escaped, such as 5 > 3 and you want to write it to the file exactly as that.


EXAMPLE

<$ret = (xmlWriterWriteRaw($writer,
                'is 5 &gt; three?  Yup!'))>


CAVEATS
xmlWriterWriteRaw() will write whatever you give it, including invalid XML markup. If you call something like

<$ret = (xmlWriterWriteRaw($writer, '<&wheeeee!<!&&!<'))>
you will be left with an XML file that is not well-formed (assuming you weren't already in a CDATA section, of course).

xmlWriterWrite would properly escape the content for storage.


SEE ALSO
xmlWriterWrite


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