SimpleXML Problems Example - Use Iterators
Output of simplexml_problems.php:
--- On Root ---
object(SimpleXMLElement)#1 (1) {
["entry"]=>
string(7) "Entry 1"
}
---
Entry 1
--- On ->entry ---
object(SimpleXMLElement)#2 (1) {
[0]=>
string(7) "Entry 1"
}
---
Entry 1
---
---
two entries
--- On Root ---
object(SimpleXMLElement)#4 (1) {
["entry"]=>
array(2) {
[0]=>
string(7) "Entry 1"
[1]=>
string(7) "Entry 2"
}
}
---
Entry 1
Entry 2
--- On ->entry ---
object(SimpleXMLElement)#1 (1) {
[0]=>
string(7) "Entry 1"
}
---
Entry 1
Entry 2
SimpleXML Problems Example - Mixed Content
© copyright 2004 Bitflux GmbH