For some reason, I am unable to pull information from an XML I am download from Shopzilla. I can trace the entire xml which displays, but when trying to get to a specific node to get the specific data, it doesn’t want to retrieve at all. Any help would be greatly appreciated, below is the code of what I have so far and XML.
var loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var request:URLRequest = new URLRequest("shopzilla.xml");
try
{
loader.load(request);
ta.appendText("xml is loaded");
}
catch(error:Error)
{
ta.appendText("xml is not loaded");
}
var xml:XML;
function onLoaded(e:Event):void
{
try
{
xml = new XML(e.target.data);
tb.appendText (xml);
trace(xml);
}
catch(e:TypeError)
{
tb.appendText ("error loading xml");
}
}
<ShopzillaQueryResponse xmlns="http://publisher.shopzilla.com/pp/xml/Publisher_API_Response.xsd">
<categoryResponse matched="0" included="2">
<category id="15010100" parent_id="15000000" display="false">
<name>Video Games</name>
<URL>http://www.shopzilla.com/7S--Video_Games_-_af_assettype_id--10__af_creative_id--6__af_id--2588__af_placement_id--__cat_id--15010100__rf--af1</URL>
</category>
<category id="15000000" parent_id="1" display="false">
<name>Video Games</name>
<URL>http://www.shopzilla.com/10B--Video_Games_-_af_assettype_id--10__af_creative_id--6__af_id--2588__af_placement_id--__cat_id--15000000__rf--af1</URL>
</category>
</categoryResponse>
<productResponse requested="1" matched="1" included="1" start="1">
<product category_id="15010100" id="513218609">
<name>Halo 3</name>
<URL>http://www.shopzilla.com/12--Halo_3_-_af_assettype_id--10__af_creative_id--6__af_id--2588__af_placement_id--__cat_id--15010100__prod_id--513218609__rf--af1</URL>
<imageURL_small>http://image.shopzilla.com/resize?sq=60&uid=513218609</imageURL_small>
<imageURL_med>http://image.shopzilla.com/resize?sq=100&uid=513218609</imageURL_med>
<imageURL_medlarge>http://image.shopzilla.com/resize?sq=160&uid=513218609</imageURL_medlarge>
<imageURL_large>http://image.shopzilla.com/resize?sq=400&uid=513218609</imageURL_large>
<maxRawImageSize/>
<desc_short>Xbox 360 - Shooting - Rated M (Mature); Platform: Xbox 360</desc_short>
<desc_long>Halo 3 is the third game in the Halo Trilogy and will provide the thrilling conclusion to the events begun in Halo: Combat Evolved. Halo 3 was first revealed at the Electronic Entertainment Expo in Los Angeles on May 6th, 2006. Halo 3 will be available for Xbox 360 in 2007. Halo 3 will pick up where Halo 2 left off. The Master Chief is returning to Earth to finish the fight. The Covenant occupation of Earth has uncovered a massive and ancient object beneath the African sands - an object who's secrets have yet to be revealed. Earth's forces are battered and beaten.</desc_long>
<prodRating URLref="prodRate-5">5</prodRating>
<prodScore>100.00</prodScore>
<numReviews>1</numReviews>
<reviewsURL>http://www.shopzilla.com/3H</reviewsURL>
<minPrice>49.96</minPrice>
<maxPrice>59.99</maxPrice>
<numMerchants>8</numMerchants>
</product>
</productResponse>
<otherResponse>
<totalProducts>23030513</totalProducts>
<totalStores>98687</totalStores>
<imageURL>
<URL id="prodRate-5">http://img.bizrate.com/site/rating_5_star_80x13.gif</URL>
</imageURL>
<trackingPixel>http://adserve.shopzilla.com/img/publisherID-2588/assetID-6/placementID-/categoryID-1/productID-513218609</trackingPixel>
</otherResponse>
</ShopzillaQueryResponse>
So as an example, when trying to get the URL in <imageURL_med>, nothing comes up (or any node). Displaying the whole XML displays fine in TextBox tb, but not when narrowing it down.
Thanks,
Corey