title: Parsing Amazon MWS Scratchpad response
body: <p>I am trying to parse xml file from amazon but found difficulties. I am using simplexml_load_string</p>
  
  <blockquote>
    <p>$xml = simplexml_load_string( 'My xml here' );</p>
  </blockquote>
  
  <p>but when I do</p>
  
  <blockquote>
    <p>echo $xml->GetMatchingProductResult->Product->AttributeSets;</p>
  </blockquote>
  
  <p>it shows nothing</p>
  
  <p>How can I access the Brand value?</p>
  
  <p>My xml file:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;GetMatchingProductResponse xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01"&gt;
  &lt;GetMatchingProductResult ASIN="B003IOSNNQ" status="Success"&gt;
    &lt;Product xmlns="http://mws.amazonservices.com/schema/Products/2011-10-01" xmlns:ns2="http://mws.amazonservices.com/schema/Products/2011-10-01/default.xsd"&gt;
      &lt;Identifiers&gt;
        &lt;MarketplaceASIN&gt;
          &lt;MarketplaceId&gt;A1F83G8C2ARO7P&lt;/MarketplaceId&gt;
          &lt;ASIN&gt;B003IOSNNQ&lt;/ASIN&gt;
        &lt;/MarketplaceASIN&gt;
      &lt;/Identifiers&gt;
      &lt;AttributeSets&gt;
        &lt;ns2:ItemAttributes xml:lang="en-GB"&gt;
          &lt;ns2:Binding&gt;Misc.&lt;/ns2:Binding&gt;
          &lt;ns2:Brand&gt;eSecure&lt;/ns2:Brand&gt;
          &lt;ns2:Feature&gt;Colour: Classic Black&lt;/ns2:Feature&gt;
          &lt;ns2:Feature&gt;Thickness: Approximately 40mm - More than msot sellers&lt;/ns2:Feature&gt;
          &lt;ns2:Feature&gt;Dimensions [length x width at widest and narrowest]: approximately 280 x 190 x 70mm&lt;/ns2:Feature&gt;
          &lt;ns2:Feature&gt;Material: Stretch Lycra, Silica Gel&lt;/ns2:Feature&gt;
          &lt;ns2:Feature&gt;Ideal for Standard Bicycle / Static Exercise Bike&lt;/ns2:Feature&gt;
          &lt;ns2:Label&gt;eSecure&lt;/ns2:Label&gt;
          &lt;ns2:Manufacturer&gt;eSecure&lt;/ns2:Manufacturer&gt;
          &lt;ns2:PackageDimensions&gt;
            &lt;ns2:Height Units="inches"&gt;2.13&lt;/ns2:Height&gt;
            &lt;ns2:Length Units="inches"&gt;10.71&lt;/ns2:Length&gt;
            &lt;ns2:Width Units="inches"&gt;7.72&lt;/ns2:Width&gt;
            &lt;ns2:Weight Units="pounds"&gt;0.49&lt;/ns2:Weight&gt;
          &lt;/ns2:PackageDimensions&gt;
          &lt;ns2:PackageQuantity&gt;1&lt;/ns2:PackageQuantity&gt;
          &lt;ns2:ProductGroup&gt;Sports&lt;/ns2:ProductGroup&gt;
          &lt;ns2:ProductTypeName&gt;SPORTING_GOODS&lt;/ns2:ProductTypeName&gt;
          &lt;ns2:Publisher&gt;eSecure&lt;/ns2:Publisher&gt;
          &lt;ns2:SmallImage&gt;
            &lt;ns2:URL&gt;http://ecx.images-amazon.com/images/I/41OIjmpza2L._SL75_.jpg&lt;/ns2:URL&gt;
            &lt;ns2:Height Units="pixels"&gt;75&lt;/ns2:Height&gt;
            &lt;ns2:Width Units="pixels"&gt;75&lt;/ns2:Width&gt;
          &lt;/ns2:SmallImage&gt;
          &lt;ns2:Studio&gt;eSecure&lt;/ns2:Studio&gt;
          &lt;ns2:Title&gt;eSecure - Extra Comfort Bike Bicycle Gel Saddle Seat Cover&lt;/ns2:Title&gt;
        &lt;/ns2:ItemAttributes&gt;
      &lt;/AttributeSets&gt;
      &lt;Relationships/&gt;
      &lt;SalesRankings&gt;
        &lt;SalesRank&gt;
          &lt;ProductCategoryId&gt;sports_display_on_website&lt;/ProductCategoryId&gt;
          &lt;Rank&gt;398&lt;/Rank&gt;
        &lt;/SalesRank&gt;
        &lt;SalesRank&gt;
          &lt;ProductCategoryId&gt;458338031&lt;/ProductCategoryId&gt;
          &lt;Rank&gt;1&lt;/Rank&gt;
        &lt;/SalesRank&gt;
      &lt;/SalesRankings&gt;
    &lt;/Product&gt;
  &lt;/GetMatchingProductResult&gt;
  &lt;ResponseMetadata&gt;
    &lt;RequestId&gt;9b44aba6-d1fa-486a-8114-2bc4f9311d8d&lt;/RequestId&gt;
  &lt;/ResponseMetadata&gt;
  &lt;/GetMatchingProductResponse&gt;
  </code></pre>