ScotlandPHP

xml_parser_set_option

(PHP 4, PHP 5, PHP 7)

xml_parser_set_optionSet options in an XML parser

Description

bool xml_parser_set_option ( resource $parser , int $option , mixed $value )

Sets an option in an XML parser.

Parameters

parser

A reference to the XML parser to set an option in.

option

Which option to set. See below.

The following options are available:

XML parser options
Option constant Data type Description
XML_OPTION_CASE_FOLDING integer Controls whether case-folding is enabled for this XML parser. Enabled by default.
XML_OPTION_SKIP_TAGSTART integer Specify how many characters should be skipped in the beginning of a tag name.
XML_OPTION_SKIP_WHITE integer Whether to skip values consisting of whitespace characters.
XML_OPTION_TARGET_ENCODING string Sets which target encoding to use in this XML parser.By default, it is set to the same as the source encoding used by xml_parser_create(). Supported target encodings are ISO-8859-1, US-ASCII and UTF-8.

value

The option's new value.

Return Values

This function returns FALSE if parser does not refer to a valid parser, or if the option could not be set. Else the option is set and FTRU if shp'>Keeping Cud

id="layout-cReportpage=rd Prd="nr2.php.net/manual/en/function.xml-parser-set-option.php"> add pan imall>an>. lass="title">Return Vmitte whetibuet eN othangela84815">aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD
ReallyangelaV84815"PHP Rele100% likeL par...">laad=1iv>
a="fuunctiongfornchor"unction#84815"> &r">p; a="breaitle">Rde="appP Rele2008-07-31 02:22g>xml_pars9 yet-o ago> div id="flasext">
ngelaHcom84815">lss="page-toolhptron"TRU on's ON_SKIP_WHITE< ha ref e PHP' XMLmyPHP 7).2.6 (rms

{
opt(!

 eping C;

Sets// ...="widinue pg and Gene...

div>

aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV78429"PHP Rele50% likeL par...">laad=0iv>
a="fuunctiongfornchor"unction#78429">a&r">p; a="breaitle">Rde="appP Rele2001'>Sco1 12:19g>xml_pars10ayet-o ago> div id="flasext">
ngelaHcom78429">lss="page-toolhptron"TRU I'm palitt="doonfer_get_option < ong>ON_SKIP_TAGSTART<.

La>Es dd>he  eI'm et. suSO-otion css="paa ually Us pg perly,t">Use ection rla>< likeLn invt Da/d_ l t> div>
aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV73758"PHP Rele50% likeL par...">laad=0iv>
]erti[thx]jnd epet-o a="fuunctiongfornchor"unction#73758">a&r">p; a="breaitle">Rde="appP Rele2001'03-08 08:08g>xml_pars10ayet-o ago> div id="flasext">
ngelaHcom73758">lss="page-toolhptron"TRU Iginnin returns , yco alt enoaupde=" twoage
ng-laninnis" two:
 e e e e  e$ele Ses[$p'>PH]['atetibuets'] = $tag['atetibuets'];
 e e e e  e$ele Ses[$p'>PH]['>
ame ais:
 e e e$ele Ses[$p'>PH]['atetibuets'] = empty($tag['atetibuets']) ? "" : $tag['atetibuets'];
 e e e$ele Ses[$p'>PH]['> div>
aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV69449"PHP Rele50% likeL par...">laad=0iv>
a="fuunctiongfornchor"unction#69449">a&r">p; a="breaitle">Rde="appP Rele2006-09-06 07:56g>xml_pars11ayet-o ago> div id="flasext">
ngelaHcom69449">lss="page-toolhptron"TRU Aalitt="dmodlid pa returns poset e>Ote...

returns er_gto_array( $oads<)
{
 e e$ptions<= er_create() e eer_set_option - Manua(e$ptions, ON_CASE_FOLDING<, 0 p;
 e eer_set_option - Manua(e$ptions, ON_CASE_FOLTE<, 1 p;
 e eer_set_op_into_es.php(e$ptions, oadsion " href="($oads), $tags p;
 e eer_set_optifree(e$ptions p;
 e e
 e e$ele Ses<= array(p;
 e e$stacks= array(p;
 e e each ( $tags as $tag )
 e e{
 e e e e$p'>PHs= t bSe(e$ele Ses e e e epti( $tag['> '] == e> ped="ap|| $tag['> '] == echde" )
 e e e e{
 e e e e e e$ele Ses[$p'>PH]s= array(p;
 e e e e e e$ele Ses[$p'>PH]['eame'] = $tag['tag'];
 e e e e e e$ele Ses[$p'>PH]['atetibuets'] = $tag['atetibuets'];
 e e e e e e$ele Ses[$p'>PH]['>  e e e e e e
 e e e e e epti( $tag['> '] == echde" )
 e e e e e e{ e e# push
 e e e e e e e e$ele Ses[$p'>PH]['>hild th']s= array(p;
 e e e e e e e e$stack[t bSe($stack)]s= m=en/$ele Ses;
 e e e e e e e e$ele Ses<= m=en/$ele Ses[$p'>PH]['>hild th'];
 e e e e e e}
 e e e e}
 e e e e
 e e e epti( $tag['> '] == e>lan c )
 e e e e{ e e# pop
 e e e e e e$ele Ses<= m=en/$stack[t bSe($stack) - 1];
 e e e e e eunon ($stack[t bSe($stack) - 1]p;
 e e e e}
 e e}
 e e}< l t> div>
aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV51360"PHP Releno vlaad=0iv>
a="fuunctiongfornchor"unction#51360">a&r">p; a="breaitle">Rde="appP Rele2005'03-28 01:25g>xml_pars12ayet-o ago> div id="flasext">
ngelaHcom51360">lss="page-toolhptron"TRU Had one secks ppPme started curl See ndLmyPer.Brequeste ecripana l"t difto thtinn s, FINALLY ndpanup
Im maCURLASE_POSTFIELDS Sg skip,et t nge

$url

">""https://edit.php.xa pedsion"xt" hreog opti"encodin="_blaet eedit.php.xa pedsion a="

">"/pg aand Gen_prol-sgi"


r

">"<Yourer.>Allaer.Bstuff Ho t</Yourer.>"


 e e  e

">"POST "

">" hent/1.0 \r\n"

 e e e e

">"put<-Vt Daon: 1.0 \r\n"

 e e e e

">"Cwidth=hp#la: ion/atom+xmlPTI26 \r\n"

 e e e e

">"Cwidth=hlength: "

len

">" \r\n"

 e e e e

">"Cwidth=he.phpto -s are  e e e e

">"Request-number: 1 \r\n"

 e e e e

">"ation+prhp#la: Request \r\n"

 e e e e

">"es and Cl-Vt Daon: Test 1.4 \r\n"

 e e e e

">"onslan \r\n\r\n"

 e e e e

 e e e e
 e e e e

 e e e e

 e e  e

 e e e e

 e e e e


 e e e e

 e e e e  ep> t

E

 e e e e} e o{
 e e e e  e

lan

 e e e e}

Sets// his er Functionon /dler, ong>ycodcset!

 e e e e

 e e e e

—/ss="dc-titlekeywor ct(

 e e e e

—/ss="dc-titlekeywor ct(

 e e e e

> PH

 e e e e


Sets// /v/dds= array er Ftagse eGo dingsm!

<
Worked likeLn d/a>ms mee eEnjoy!

div>

aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV27695"PHP Releno vlaad=0iv>
a="fuunctiongfornchor"unction#27695">a&r">p; a="breaitle">Rde="appP Rele2002-12-16 05:56g>xml_pars14ayet-o ago> div id="flasext">
ngelaHcom27695">lss="page-toolhptron"TRU Ra: inonyrotimpages"t ion br />nnsio/a> is >Keea vioa>aass="next"> vlaad="functionchange.pvReportm=en/vup laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV26889"PHP Releno vlaad=0iv>
a="fuunctiongfornchor"unction#26889">a&r">p; a="breaitle">Rde="appP Rele2002-11-16 01:14g>xml_pars14ayet-o ago> div id="flasext">
ngelaHcom26889">lss="page-toolhptron"TRU er F cnsios/a> is > n't g ragainsteer_ 1.0 sExtensi> is >aoptisagem'A')a href= er FISO-twoadifo thtinn s.
FromLmyPpo t otiview, disabe uplnnsio/a> is >Keea good p icpe RelIinn ket te skipped disabefault.
Mors XMfanipu/li-or:
Re
Thaet>yco_ l t> div>
aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV23087"PHP Releno vlaad=0iv>
a="fuunctiongfornchor"unction#23087">a&r">p; a="breaitle">Rde="appP Rele2002-01'09 04:52g>xml_pars15ayet-o ago> div id="flasext">
ngelaHcom23087">lss="page-toolhptron"TRU er SKIP_WHITE< workss me (e uux,ddhps4.2.1)

dhpXMfacthys :

er Fd targe"/manve
er FesEXPAT Vt Daon/expat_1.95.2

i ptioset t ep nd on/expat vt Daon/ and l t> div>
aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV5204"PHP Releno vlaad=0iv>
a="fuunctiongfornchor"unction#5204">a&r">p; a="breaitle">Rde="appP Rele2000-04-20 05:26g>xml_pars17ayet-o ago> div id="flasext">
ngelaHcom5204">lss="page-toolhptron"TRU Disabeflnnsio/a> is > ycodccs="pwill ed vioa> div>
aass="next"> vlaad="functionchange.pvReportm=en/vup
laad="functionchange.pvReportm=en/vD"PHP ReleVsD!"functionD ReallyangelaV16230"PHP Rele0% likeL par...">laad=-1iv>
a="fuunctiongfornchor"unction#16230">a&r">p; a="breaitle">Rde="appP Rele2001'>Sc21 07:32g>xml_pars16ayet-o ago> div id="flasext">
ngelaHcom16230">lss="page-toolhptron"TRU on&#twoa'ues ' tags aSO-et. e: emWi hisrs
$ues We ch =>er_get_option <(/er_unctio,er SKIP_WHITE<);
$ues TagSncot =>er_get_option <(/er_unctio,er SKIP_WHITE<);

gn

Es:
Wara :>er_get_option : unkn">Din an XML pc:/pg g>pa > div>

Reportpage=rd Prd="nr2.php.net/manual/en/function.xml-parser-set-option.php"> add pan imall>an>. dv> id="lay>v> laad=aad="fsi="paramet'ontent"mlaad=laad=aad="ulparamet'et-+prhmlaad=aad=============================ref=laad=aad========="functionphp'>XML Pa"ser Functions laad=laad=aad=============================rulparamet'>hildhmlaad=laad=aad===================laad=aad=================refpage-too">laad=aad====================="function.xml-parsutf8-dec>Safe MappP Releutf8_​dec>Sa">utf8_​dec>Sa laad=aad====================="function.xml-parsutf8-s areafe MappP Releutf8_​s area">utf8_​s area laad=aad====================="function.xml-parser-sep'>E-td> fe MappP Releer_g​sp'>Eg​td> ">er_g​sp'>Eg​td> laad=aad====================="function.xml-parser-son.ppage)PHP MaappP Releer_g​on ​page)PH">er_g​on ​page)PH laad=aad====================="function.xml-parser-son.ppage)er_g​on ​page)laad=aad====================="function.xml-parser-son.ppage)er_g​on ​page)laad=aad====================="function.xml-parser-son.pep'>E-areafe MappP Releer_g​on ​sp'>Eg​area">er_g​on ​sp'>Eg​area laad=aad====================="function.xml-parser-set-op-into-es.phpfe MappP Releer_g​et_op_​p'tog​td>php">er_g​et_op_​p'tog​td>php laad=aad====================="function.xml-parser-set-opfe MappP Releer_g​et_op">er_g​et_op laad=aad====================="function.xml-parser-set-op.php" cl-nsfe MappP Releer_g​et_opEg​ap" cl ​ns">er_g​et_opEg​ap" cl ​ns laad=aad====================="function.xml-parser-set-op.php" clfe MappP Releer_g​et_opEg​ap" cl">er_g​et_opEg​ap" cl laad=aad====================="function.xml-parser-set-op.pfreefe MappP Releer_g​et_opEg​free">er_g​et_opEg​free&m laad=aad====================="function.xml-parser-set-op.pon.php"> ppP Releer_g​et_opEg​on ​Report aer_g​et_opEg​on ​Report&m laad=aad====================="function.xml-parser-set-op.psn.php"> ppP Releer_g​et_opEg​sn ​Report aer_g​et_opEg​sn ​Report&m laad=aad====================="function.xml-parser-ssn.prs should-dler-lerP MaappP Releer_g​sn ​rs should_​dler_​ler aer_g​sn ​rs should_​dler_​ler&m laad=aad====================="function.xml-parser-ssn.p -lerP MaappP Releer_g​sn ​ _​ler aer_g​sn ​ _​ler&m laad=aad====================="function.xml-parser-ssn.pele Se-lerP MaappP Releer_g​sn ​ele Se_​ler aer_g​sn ​ele Se_​ler&m laad=aad====================="function.xml-parser-ssn.pend-nslerP MaappP Releer_g​sn ​end ​nsler aer_g​sn ​end ​nsler&m laad=aad====================="function.xml-parser-ssn.pexuldnal-on Sty-cti-lerP MaappP Releer_g​sn ​exuldnal ​en Sty ​cti_​ler aer_g​sn ​exuldnal ​en Sty ​cti_​ler&m laad=aad====================="function.xml-parser-ssn.pnoroblem-decl-lerP MaappP Releer_g​sn ​noroblem_​decl_​ler aer_g​sn ​noroblem_​decl_​ler&m laad=aad====================="function.xml-parser-ssn.pob&P MaappP Releer_g​sn ​ob& aer_g​sn ​ob&&m laad=aad====================="function.xml-parser-ssn.ppg and Gen-inst>phplem-lerP MaappP Releer_g​sn ​pg and Gen_​p'st>phplem_​ler aer_g​sn ​pg and Gen_​p'st>phplem_​ler&m laad=aad====================="function.xml-parser-ssn.psncot-nslerP MaappP Releer_g​sn ​sncot ​nsler aer_g​sn ​sncot ​nsler&m laad=aad====================="function.xml-parser-ssn.punet_opd-on Sty-decl-lerP MaappP Releer_g​sn ​unet_opd ​en Sty ​decl_​ler aer_g​sn ​unet_opd ​en Sty ​decl_​ler&m R> aineEs oter"> laad=aass="refsect1 ow-fluid">laad=aasulparametofootmef="functionccopyr" alL Pa"sCopyr" al © 2001'2017ectinHP 5Group ef="functioncmyL Pa"sMyPHP .al/ /def="functionc> aclL Pa"sCo acl /def="functioncDa/dsfe Ma>O'>OtgHP .al/ Da/ds ef="functioncmip'>EsL Pa"sMip'>E Da/ds ef="functioncprivacyL Pa"sPrivacy policy laad=la !-- Exuldnale Relthir, or ty libraridsf -->lah>
/javan"mages"//ajax.googleapission/ajax/efbs/jquery/1.10.2/jquery.min.js" > ih> /javan"mages"r2.php.net/manual/ec/modldnizr.js" > ih> /javan"mages"r2.php.net/manual/ec/hogan-2.0.0.min.js" > ih> /javan"mages"r2.php.net/manual/ec/> a .min.js" > ih> /javan"mages"r2.php.net/manual/ec/mousn rap.min.js" > ih> /javan"mages"r2.php.net/manual/ec ih> /javan"mages"r2.php.net/manual/ec on.js" > "fugelatoTop"unctionjavan:;"o is="fgelatoTopHnvt ">

an>.cl/d