File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / simplexml / README
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:01 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: SimpleXML is meant to be an easy way to access XML data.
    2: 
    3: SimpleXML objects follow four basic rules:
    4: 
    5: 1) properties denote element iterators
    6: 2) numeric indices denote elements
    7: 3) non numeric indices denote attributes
    8: 4) string conversion allows to access TEXT data
    9: 
   10: When iterating properties then the extension always iterates over
   11: all nodes with that element name. Thus method children() must be 
   12: called to iterate over subnodes. But also doing the following:
   13: foreach ($obj->node_name as $elem) {
   14:   // do something with $elem
   15: }
   16: always results in iteration of 'node_name' elements. So no further 
   17: check is needed to distinguish the number of nodes of that type.
   18: 
   19: When an elements TEXT data is being accessed through a property
   20: then the result does not include the TEXT data of subelements.
   21: 
   22: Known issues
   23: ============
   24: 
   25: Due to engine problems it is currently not possible to access
   26: a subelement by index 0: $object->property[0].
   27: 
   28: TODO
   29: ====
   30: 
   31: At the moment property access to multiple elements of the same
   32: name returns an array of SimpleXML objects. This should be an 
   33: object of a new type instead so that all kinds of linkage,
   34: assignment and deleting would work.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>