i am trying to write a php script which will eventually get the xml response from the amazon api and parse the xml to pull out data.
i am very new to php so i am doing this in baby steps. right now i am trying to just get the xml response from amazon and store it in a variable.
for some reason instead of an xml reponse being stored in my variable, i am just gettign all the text from the xml all squished into a single text string (no xml tags).
here is my code:
so as you can see, first i define the request URL. then i use file_get_contents() to read the amazon response into the $xml_str variable. then i print the $xml_str variable to the screen.
i would expect it to display the following:
but instead it displays: