Re: Re[2]: [PHP] Object assignment
| From: | Matt Grimm | Date: | Thu, 10 Jul 2003 16:29:23 +0000 |
| Subject: | Re: Re[2]: [PHP] Object assignment | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154750@lists.php.net to get a copy of this message | ||
The array structure is the one suggested on the xml_parse_into_struct page
user comments. Our example XML would parse into this:
Array
(
[ROOTELEMENT] => Array
(
[0] => Array
(
[ATTRIBUTES] => Array
(
[ID] => 1
)
[RECORD] => Array
(
[0] => Array
(
[ATTRIBUTES] => Array
(
[ID] => 1
)
[VALUE] => Value 1
)
[1] => Array
(
[ATTRIBUTES] => Array
(
[ID] => 2
)
[VALUE] => Value 2
)
)
)
)
)
And my source is here:
http://www.healthtvchannel.org/test/php2xml.phps
--
Matt Grimm
Web Developer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Parkway
Anchorage, AK 99508
907.770.6200 ext. 686
907.336.6205 (fax)
E-mail: mgrimm@healthtvchannel.org
Web: www.healthtvchannel.org
"Tom Rogers" <trogers@kwikin.com> wrote in message
news:638618684.20030710112953@kwikin.com...
> Hi,
>
> Thursday, July 10, 2003, 6:44:55 AM, you wrote:
> MG> Tom:
>
> MG> Thanks for the help. Using the array setup you described, I end up
with the
> MG> value of each "record" node being appended to a single instance of the
> MG> parent node. And that single instance of the parent node is the final
one
> MG> that was parsed (the attributes verify this). The example I used
below is
> MG> outputting this:
>
> MG> <rootElement>
> MG> <record id="2">Value 1Value 2</record>
> MG> </rootElement>
>
> MG> Any ideas?
>
> Can you send me the bit of code or the array you are using so I can
> see better what you are doing :)
> Maybe I miss understood something
>
>
> --
> regards,
> Tom
>