Damn that's handy .. Normally takes a few lines and bloated libraries to do the same thing in other unnamed languages :-) Thanks. - Jon >>> list($version) = simplexml_load_string($xml)->xpath('/foo[@bar = "baz"]/@version'); The xpath() method returns an array of items, but I know I'm only interested in the first (and only) one. <<<