0
尋找一種將幾個Simple XML對象添加在一起的方法。目標是將它們作爲單個XML文檔輸出,但作爲XML DOM中的單獨條目輸出。我不知道如何完成這一點。對象是在這樣一個數組:將XML對象分組
Array (
[0] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[no] => 23432423
[type] => Array
)
[id] => 40043030
[title] => Cars
[cinemadate] => 2011-07-06
[changedate] => 2011-07-27T10:19:00
[year] => 2011
[length] => 112
[genres] => SimpleXMLElement Object
(
[genre] => animatie
)
[1] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[no] => 48050593
[type] => Array
)
[id] => 1231676
[title] => Arrietty
[cinemadate] => 2011-07-06
[changedate] => 2011-06-21T10:39:00
[genres] => SimpleXMLElement Object
(
[genre] => animatie
)
什麼是你的XML看起來相似嗎? – ajreal