xmlTreeNewPI

SYNOPSIS

xmlNode xmlTreeNewPI(xmlNode parent, string target,
                         string content)

Parameters:

  • parent - the xmlNode that will be the parent of the new processing instruction

  • target - the application to which the processing instruction is directed

  • content - the content for the new processing instruction

Returns:

  • the xmlNode for the new processing instruction


DESCRIPTION
xmlTreeNewPI() creates a new processing instruction as a child of parent. Processing instructions are commonly used to assign a stylesheet to XML data. See http://www.w3.org/TR/REC-xml/#sec-pi for more information.


EXAMPLE

<$pi = (xmlTreeNewPI($doc, 'xml-stylesheet',
                         'type="text/xsl" href="default.xsl"'))>

will produce this in the XML output:

<?xml-stylesheet type="text/xsl" href="default.xsl"?>


SEE ALSO
xmlTreeNewElement, xmlTreeNewText, xmlTreeNewCDATA, xmlTreeNewComment


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