<HTML ><HEAD ><TITLE >xml_parser_set_option</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="XML parser functions" HREF="ref.xml.html"><LINK REL="PREVIOUS" TITLE="xml_parser_get_option" HREF="function.xml-parser-get-option.html"><LINK REL="NEXT" TITLE="xml_set_character_data_handler" HREF="function.xml-set-character-data-handler.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.xml-parser-get-option.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.xml-set-character-data-handler.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.xml-parser-set-option" ></A >xml_parser_set_option</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN96107" ></A ><P > (PHP 3>= 3.0.6, PHP 4 )</P >xml_parser_set_option -- set options in an XML parser</DIV ><DIV CLASS="refsect1" ><A NAME="AEN96110" ></A ><H2 >Description</H2 >bool <B CLASS="methodname" >xml_parser_set_option</B > ( resource parser, int option, mixed value)<BR ></BR ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><TT CLASS="parameter" ><I >parser</I ></TT ></DT ><DD ><P > A reference to the XML parser to set an option in. </P ></DD ><DT ><TT CLASS="parameter" ><I >option</I ></TT ></DT ><DD ><P > Which option to set. See below. </P ></DD ><DT ><TT CLASS="parameter" ><I >value</I ></TT ></DT ><DD ><P > The option's new value. </P ></DD ></DL ></DIV > </P ><P > This function returns <TT CLASS="constant" ><B >FALSE</B ></TT > if <TT CLASS="parameter" ><I >parser</I ></TT > does not refer to a valid parser, or if the option could not be set. Else the option is set and <TT CLASS="constant" ><B >TRUE</B ></TT > is returned. </P ><P > The following options are available: <DIV CLASS="table" ><A NAME="AEN96146" ></A ><P ><B >Table 1. XML parser options</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><THEAD ><TR ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Option constant</TH ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Data type</TH ><TH ALIGN="LEFT" VALIGN="MIDDLE" >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >XML_OPTION_CASE_FOLDING</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >integer</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > Controls whether <A HREF="ref.xml.html#xml.case-folding" >case-folding</A > is enabled for this XML parser. Enabled by default. </TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >XML_OPTION_TARGET_ENCODING</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >string</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" > Sets which <A HREF="ref.xml.html#xml.encoding" >target encoding</A > to use in this XML parser. By default, it is set to the same as the source encoding used by <A HREF="function.xml-parser-create.html" ><B CLASS="function" >xml_parser_create()</B ></A >. Supported target encodings are <TT CLASS="literal" >ISO-8859-1</TT >, <TT CLASS="literal" >US-ASCII</TT > and <TT CLASS="literal" >UTF-8</TT >. </TD ></TR ></TBODY ></TABLE ></DIV > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.xml-parser-get-option.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.xml-set-character-data-handler.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >xml_parser_get_option</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.xml.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >xml_set_character_data_handler</TD ></TR ></TABLE ></DIV ></BODY ></HTML >