- Code: Select all
SimpleXMLElement object(
'@attributes' => Array(
'globalSearch' => 1,
'lang' => 'en_us',
'requestQuery' => 'i=28608',
'requestUrl' => '/item-info.xml'
),
'itemInfo' => SimpleXMLElement object(
'item' => SimpleXMLElement object(
'@attributes' => Array(
'icon' => 'inv_boots_plate_04',
'id' => 28608,
'level' => 115,
'name' => 'Ironstriders of Urgency',
'quality' => 4,
'type' => 'Plate'
),
'cost' => SimpleXMLElement object(
'@attributes' => Array(
'sellPrice' => 63623
)
),
Most of my code structures attempt to pull this way (pseudo code)
- Code: Select all
$icon = $itemInfo->item->attributes->icon;
$name = $itemInfo->item->attributes->name;
etc.
However, it fails to actually extract, probably due to the @ symbol in the XML structure. Does anyone have a workaround for this? I guess I may just not know how to escape that character in an object...