<?php $file = "http://ww3.bgbm.org/biocase/pywrapper.cgi?dsa=Herbar"; $dom = new DOMDocument(); $dom->Load($file); $Schema = $dom->getElementsByTagName('SupportedSchemas'); foreach ($Schema as $Schema) { echo $Schema->getAttribute('namespace'); } ?>