OxyScripts.com
Menu spacer Home Tutorials Articles Code Forums irc.freenode.net #oxyscripts
Main (PHP)
Home Forums PHP News PHP Tutorials Articles PHP Code Snippets Contact Us Sysadmin Resources Books Template Shop
3rd Party Streams
SlashDot PHPDeveloper.org PHP.Net
Resources
PHP Manual MySQL Manual Smarty Manual PEAR Manual PHP-GTK Manual Symfony Manual
Code Snippets
Authentication Database Graphics HTTP Miscellaneous Time/Date
Affiliates
Scripts TutorialMan TutorialGuide CodingForums.com PHP Scripts Cheap Web Hosting Affordable Web Hosting Dreamweaver Templates

Search This Site :     PHP Function Reference :
 
XML_Unserializer Options

XML_Unserializer Options

XML_Unserializer Options -- List of all XML_Unserializer options

Introduction to options

Options let you influence, how XML_Unserializer treats the parsed XML. It allows you to define, whether attributes should be parsed, whether to use associative arrays or objects for complex data types and more.

Options can be passed as an associative array to the constructor of XML_Unserializer. You may also use setOption(), or setOptions() to set one or more options after the instance of XML_Unserializer has been created.

All available options

Here is a list of all options supported by XML_Unserializer.

Table 49-1. XML_Unserializer options

OptionPossible valuesDefaultDescription
complexTaype'array' or 'object''array'Defines, whether nested tags should be returned as associative arrays or objects
keyAttributeany string'_originalKey'If the attribute specified in this option exists for a tag, the value will be used as key or property name in the parent object or array
typeAttributeany string'_type'If this attribute exists for a tag, the tag content will be converted to the specified type. Possible types are: string, integer, float, boolean, array and object
classAttributeany string'_class'If XML_Unserializer creates an object, it will be an instance of stdClass, unless the tag has the attribute specified in this option. If it is set, the classname stored in the attribute value will be used.
parseAttributesTRUE or FALSETRUEWith this option, you may tell XML_Unserializer to also parse the attributes of the tags. The next two options define how to treat the parsed attributes.
attributesArrayFALSE or any stringFALSEIf set to false, the attributes will be treated like nested tags. If you set it to a string, a new aray will be created and stored in the parent structure using key you specified in this option
prependAttributesany string''Allows you to specify a prefix for attribute names.
contentNameany string'_content'If you decide to parse attributes or a tag contains cdata and tags, then the cdata will be stored in the index specified here.
tagMapassociative arrayarray()This allows you to map tag names to PHP classes. The names of the tags have to be in the keys and the values contain the class names to use for each tag.

 
   Print this page

Top Sponsor
Symantec\'s Norton SystemWorks 2006
Sponsors
CA
Sponsors
AdWords Dominator 125*125
Advertisting

Affiliates
VertexTemplates PHPFreaks CodeWalkers StarGeek DevScripts CGI & PHP Scripts PHP CMS

Shopping Rebates   Sell It 4 You   Flash Page Counters   Get Insured
GPS Tracking Service   Charity Donate Info   Web Site Hosting   VOIP Service

Privacy Policy | Links | Site Map | Advertising

All content on OxyScripts.com is (©)2002-2007

 
Powered by Adrastea - Version 1.0.0. Copyright © Rune Solutions, 2004-2005