Hallo zusammen,
woran könnte es liegen, dass folgende Probleme auftreten:
Bei simplexml_load_string:
=> Die Struktur wird richtig erfasst, jedoch der Text nicht.
Bei Zend_Config_Xml:
=> Es wird nur ein Element von <ad> erfasst, aber diesmal ist der Text drin.
XML:
Ausgabe simplexml_load_string:
Ausgabe Zend_Config_Xml:
Vielen Dank
woran könnte es liegen, dass folgende Probleme auftreten:
Bei simplexml_load_string:
=> Die Struktur wird richtig erfasst, jedoch der Text nicht.
Bei Zend_Config_Xml:
=> Es wird nur ein Element von <ad> erfasst, aber diesmal ist der Text drin.
XML:
Code:
<?xml version="1.0" encoding="UTF-8"?> <test> <ad> <id>1</id> <b_id>8</b_id> <link>http://www.example.com/?B_ID=48</link> <k_foto>http://www.example.com/48.jpg</k_foto> <b><![CDATA[hier steht ein Text]]></b> </ad> <ad> <id>1</id> <b_id>8</b_id> <link>http://www.example.com/?B_ID=48</link> <k_foto>http://www.example.com/48.jpg</k_foto> <b><![CDATA[hier steht ein Text]]></b> </ad> <ad> <id>1</id> <b_id>8</b_id> <link>http://www.example.com/?B_ID=48</link> <k_foto>http://www.example.com/48.jpg</k_foto> <b><![CDATA[hier steht ein Text]]></b> </ad> </test>
Code:
SimpleXMLElement Object ( [ad] => Array ( [0] => SimpleXMLElement Object ( [id] => 1 [b_id] => 8 [link] => http://www.example.com/?B_ID=48 [k_foto] => http://www.example.com/48.jpg [b] => SimpleXMLElement Object ( ) ) [1] => SimpleXMLElement Object ( [id] => 1 [b_id] => 8 [link] => http://www.example.com/?B_ID=48 [k_foto] => http://www.example.com/48.jpg [b] => SimpleXMLElement Object ( ) ) [2] => SimpleXMLElement Object ( [id] => 1 [b_id] => 8 [link] => http://www.example.com/?B_ID=48 [k_foto] => http://www.example.com/48.jpg [b] => SimpleXMLElement Object ( ) ) ) )
Code:
Zend_Config_Xml Object ( [_skipExtends:protected] => [_allowModifications:protected] => [_index:protected] => 0 [_count:protected] => 1 [_data:protected] => Array ( [ad] => Zend_Config Object ( [_allowModifications:protected] => [_index:protected] => 0 [_count:protected] => 5 [_data:protected] => Array ( [id] => 1 [b_id] => 8 [link] => http://www.example.com/?B_ID=48 [k_foto] => http://www.example.com/48.jpg [b] => hier steht ein Text ) [_skipNextIteration:protected] => [_loadedSection:protected] => [_extends:protected] => Array ( ) [_loadFileErrorStr:protected] => ) ) [_skipNextIteration:protected] => [_loadedSection:protected] => [_extends:protected] => Array ( ) [_loadFileErrorStr:protected] => )
Kommentar