On Sun, Mar 10, 2013 at 6:28 PM, Karl DeSaulniers <k...@designdrumm.com> wrote:
> On Mar 10, 2013, at 6:03 AM, richard gray wrote:
>> On 10/03/2013 11:47, Karl DeSaulniers wrote:
>>> Hi Guys,
>>> I am hoping someone can guide me or help me fix this issue.
>>> I have been lost in the code for some time now.
>>> I am trying to get the attributes of an xml node.
>>> I have this code:
>> this may help ->
>>> I do admit I haven't the foggiest idea what I am doing here, so I am
>>> noobing out here on how this php function is really working.
>>> I got it off php.net and am trying to implement it in my code. Without my
>>> addition it works well except it doesn't grab any attributes
>>> which I need in order for my script to work properly.
>>> Any ideas on what I am doing wrong?
> Thanks rich,
> That uses simpleXML. I am using xml_parse_create.
> Any ideas for xml_parse_create? I really like the way this function
> puts everything into an array that I can traverse. I only need it to put
> the attribute values in the array for the corresponding node and I am done.
> Thanks for your help,
> Karl DeSaulniers
> Design Drumm
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
I came across this XML to JSON to an array some time ago. It might be something
return json_decode(json_encode((array) simplexml_load_string($xml)),1);
Cat, the other other white meat
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php