diff options
author | Marcus Boerger <helly@php.net> | 2004-01-17 19:41:32 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2004-01-17 19:41:32 +0000 |
commit | 9e29f17493284dee81d2842f6067b24fba9538a5 (patch) | |
tree | 7bf345c4b3f5ed7c4f205335b3fa7a8f96dc8b1e /ext/simplexml/README | |
parent | d5d2d9ef492075e6ec55de9af7d3029babda5be7 (diff) | |
download | php-git-9e29f17493284dee81d2842f6067b24fba9538a5.tar.gz |
Major bugfix for consistency.
# After long discussions we came to a conclusion on how to make this
# extension consistent in itself.
# Thanks to Rob for all the work
Diffstat (limited to 'ext/simplexml/README')
-rwxr-xr-x | ext/simplexml/README | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ext/simplexml/README b/ext/simplexml/README index 9a867157f2..f99f6ac3c9 100755 --- a/ext/simplexml/README +++ b/ext/simplexml/README @@ -2,18 +2,23 @@ SimpleXML is meant to be an easy way to access XML data. SimpleXML objects follow four basic rules: -1) properties denote elements +1) properties denote element iterators 2) numeric indices denote elements 3) non numeric indices denote attributes 4) string conversion allows to access TEXT data +When iterating proerties then the extension always iterates over +all nodes with that elemtnt name. Thus method childen() must be +called to iterate over subnodes. But also doing the following: +foreach $obj->node_name as $elem) { + // do something with $elem +} +Always result in iteration of 'node_name' elements. So no further +check is needed to distinguish the number of nodes of that type. + When an elements TEXT data is being accessed through a property then the result does not include the TEXT data of subelements. -If PHP is compiled with ext/SPL being compiled into the binary -then SimpleXML objects implement the interface RecursiveIterator -so that they can be iterated recursively (http://pecl.php.net/spl). - Known issues ============ |