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 TRUE is returned.

User Contributed Notes 10 notes

The option XML_OPTION_SKIP_WHITE has no effect in my PHP 5.2.6 (with expat-1.95.8-5). To skip cdata composed of white space only, simply check for that at the beginning of your cdata callback function:

I'm a little confused about using xml_parser_set_option and xml_parser_get_option with XML_OPTION_SKIP_WHITE and XML_OPTION_SKIP_TAGSTART.

Looking at the source code, ...set_option() accepts both ...SKIP_WHITE and ...SKIP_TAGSTART, and sets a program variables. On the other hand, ...get_option() returns an error for both. I'm not sure of the code actually uses the variables properly, although it does reference the set variables. This does look like an oversite.

Had one heck of a time getting curl to send my XML request. Tried a lot of different things, FINALLY ended up with this.

Im making a curl request to paymentech / Orbital 's payment gateway. Essentially, I took the same header i made for the fsockopen() request, and used it for this curl request. (Hostinc company didnt allow fsockopen().

You'll note that this specific gateway requires a custom content type header. Thats what gave me the most trouble. When using the CURLOPT_HTTPHEADER, and CURLOPT_POSTFIELDS together, it doesnt matter, it sends the default post header because of CURLOPT_POSTFIELDS.

XML is case sensitive, then, from my point of view, disabling case folding doesn't goes against xml 1.0 specifications but the contrary, disabling case folding allow us to distiguish between diferent cases of the same letter ('a' and 'A') which of XML are two diferent things.From my point of view, disabling case folding is a good practice and I think it should be disabled by default.More information on:http://www.isacat.net/2001/xml/case.htmandhttp://www.w3.org/TR/REC-xmlThank you.