Проблемы SimpleXml, получающие доступ xml узлы

у меня есть серьезные проблемы, получающие доступ к узлам определенного XML-файла:

http://write.fm/cqsmrf5

с print_r я получаю следующий результат:

SimpleXMLElement Object
(
    [RecordSet] => SimpleXMLElement Object
        (
            [@attributes] => Array
                (
                    [dataSource] => testdatabase
                    [totalRecordCount] => 3573
                )

            [Record] => Array
                (
                    [0] => SimpleXMLElement Object
                        (
                            [@attributes] => Array
                                (
                                    [counter] => 1
                                )

                            [Fields] => SimpleXMLElement Object
                                (
                                    [Field] => Array
                                        (
                                            [0] => Barcelona
                                            [1] => 1
                                        )

                                )

                        )

                    [1] => SimpleXMLElement Object
                        (
                            [@attributes] => Array
                                (
                                    [counter] => 2
                                )

                            [Fields] => SimpleXMLElement Object
                                (
                                    [Field] => Array
                                        (
                                            [0] => Cádiz
                                            [1] => 2
                                        )

                                )

                        )

                )

        )

Я пытался получить доступ через печать команды $xml->recordset->record[0]->fields->field[0]; Но я только получаю ошибку:

Notice: Trying to get property of non-object in /Applications/MAMP/htdocs/test.php on line 18

Мог любой выручать меня.Заранее спасибо.

1
задан oezi 26 July 2010 в 12:15
поделиться