I am a PHP newbie and trying to parse an Amazon order (sample XML attached).
I have found xml_parse_into_struct - which creates the attached XML document.
I am trying to figure out the code that will allow me to get
the address information, &Name, &AddressFieldOne,&AddressFieldTwo,&City,&StateOrRegion,&PostalCode,&CountryCode,&PhoneNumber
The order information (Item, ItemPrice and ItemFees).
I've been searching many PHP examples looking for a sample to model the parsing after.
I've found
"http://www.nusphere.com/kb/phpmanual/fu ... struct.htm?" -- but I don't think this is what I need.
If anyone has examples of processing an XML document with similar arrays like Amazon has in it's order processing (or an Amazon order), I'd appreciate any direction.
Thanks in advance for any pointer.
phpNewbie
PHP Multi-Dimension array processing
Moderator: General Moderators
-
phpnewbie4
- Forum Newbie
- Posts: 1
- Joined: Sat Jul 03, 2010 10:37 pm
Re: PHP Multi-Dimension array processing
You might want to check out the PEAR xml parser library: http://pear.php.net/package/XML_Parser/redirected
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: PHP Multi-Dimension array processing
Take a look at SimpleXML and it's user comments.