- simplexml_load_string: documentation ( source)
<?php
$xmlstr = <<<XML
<?xml version="1.0" encoding="utf-8"?>
<evaluation test="BDI II">
<scales>
<scale id="_p" order="0" name="Gesamt" agg="sum" range="*">
</scale>
</scales>
</evaluation>
XML;
$xml=simplexml_load_string($xmlstr);
echo ($xml->scales->scale->range->Count());