Re: Using DOMXML with homogenous elements

This is a discussion on Re: Using DOMXML with homogenous elements within the PHP General forums, part of the PHP Programming Forums category; And nevermind, problem solved in another thread. -- Matt Grimm Web Developer The Health TV Channel, Inc. (a non - profit organization) ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-11-2003
Matt Grimm
 
Posts: n/a
Default Re: Using DOMXML with homogenous elements

And nevermind, problem solved in another thread.

--
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

"Matt Grimm" <mgrimm@healthtvchannel.org> wrote in message
news:20030710230603.52831.qmail@pb1.pair.com...
> I have a final kink to work out of an array to XML parser I've been

writing.
> The array structure is below, along with the example XML it came from. A
> link to the source I'm working on is at bottom. The only problem this
> script runs into is when there are multiple elements with the same name on
> the same node level. It crams all the values into a single element with
> that name, and uses only the final element's attributes. It seemed like
> clone_node() was the answer, but it isn't working correctly in this
> context -- anyone see why? I sure don't.
>
> [xml]
> <?xml version="1.0"?>
> <rootElement>
> <record id="1">Value 1</record>
> <record id="2">Value 2</record>
> </rootElement>
> [/xml]
>
> [array]
> Array
> (
> [rootElement] => Array
> (
> [0] => Array
> (
> [record] => Array
> (
> [0] => Array
> (
> [ATTRIBUTES] => Array
> (
> [id] => 1
> )
>
> [VALUE] => Value 1
> )
>
> [1] => Array
> (
> [ATTRIBUTES] => Array
> (
> [id] => 2
> )
>
> [VALUE] => Value 2
> )
>
> )
>
> )
>
> )
>
> )
> [/array]
>
> Source:
> http://www.healthtvchannel.org/test/php2xml.phps
>
> Thanks,
> --
> 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
>
>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:32 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0