title: php read xml data with xsd schema
body: <p>since hours i try to read out the data from a xml file with a xsd schema,  but i can not figure it out how i get do the data. i can validate the file but i can not access the data,
  how can i create an object, do i have to create a new xml file?</p>
  
  <p>thanks!</p>
  
  <p>here is the code so far 
  php</p>
  
  <pre><code>$doc = new DOMDocument();
  $doc-&gt;load('xml/test.xml');
  if ($doc-&gt;schemaValidate('http://caaml.org/Schemas/V5.0/Profiles/BulletinEAWS/CAAMLv5_BulletinEAWS.xsd')) {
  
      echo $doc-&gt;MetaData;
  }
  </code></pre>
  
  <p>here the first few lines of the xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;caaml:Bulletin xmlns:caaml="http://caaml.org/Schemas/V5.0/Profiles/BulletinEAWS" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://caaml.org/Schemas/V5.0/Profiles/BulletinEAWS http://caaml.org/Schemas/V5.0/Profiles/BulletinEAWS/CAAMLv5_BulletinEAWS.xsd" gml:id="BulletinDeID1175"&gt;
    &lt;caaml:metaDataProperty&gt;
      &lt;caaml:MetaData&gt;
        &lt;caaml:dateTimeReport&gt;2014-03-06T07:30:00+01:00&lt;/caaml:dateTimeReport&gt;
        &lt;caaml:srcRef xlink:href="OpIDLwdTirol"/&gt;
        &lt;caaml:comment&gt;Rudi Mair&lt;/caaml:comment&gt;
      &lt;/caaml:MetaData&gt;
    &lt;/caaml:metaDataProperty&gt;
    &lt;caaml:validTime&gt;
      &lt;caaml:TimeInstant&gt;
        &lt;caaml:timePosition&gt;2014-03-06+01:00&lt;/caaml:timePosition&gt;
      &lt;/caaml:TimeInstant&gt;
    &lt;/caaml:validTime&gt;
    &lt;caaml:bulletinResultsOf&gt;
      &lt;caaml:BulletinMeasurements&gt;
        &lt;caaml:extFiles&gt;
          &lt;caaml:ExtFile gml:id="ExtFileID01"&gt;
            &lt;caaml:description&gt;&lt;/caaml:description&gt;
            &lt;caaml:fileReferenceURI&gt;http://lwdweb.tirol.gv.at/fotos/Franz_Senn_Huette.jpg&lt;/caaml:fileReferenceURI&gt;
          &lt;/caaml:ExtFile&gt;
        &lt;/caaml:extFiles&gt;
  </code></pre>