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?
thanks!
here is the code so far php
$doc = new DOMDocument();
$doc->load('xml/test.xml');
if ($doc->schemaValidate('http://caaml.org/Schemas/V5.0/Profiles/BulletinEAWS/CAAMLv5_BulletinEAWS.xsd')) {
echo $doc->MetaData;
}
here the first few lines of the xml file
<?xml version="1.0" encoding="UTF-8"?>
<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">
<caaml:metaDataProperty>
<caaml:MetaData>
<caaml:dateTimeReport>2014-03-06T07:30:00+01:00</caaml:dateTimeReport>
<caaml:srcRef xlink:href="OpIDLwdTirol"/>
<caaml:comment>Rudi Mair</caaml:comment>
</caaml:MetaData>
</caaml:metaDataProperty>
<caaml:validTime>
<caaml:TimeInstant>
<caaml:timePosition>2014-03-06+01:00</caaml:timePosition>
</caaml:TimeInstant>
</caaml:validTime>
<caaml:bulletinResultsOf>
<caaml:BulletinMeasurements>
<caaml:extFiles>
<caaml:ExtFile gml:id="ExtFileID01">
<caaml:description></caaml:description>
<caaml:fileReferenceURI>http://lwdweb.tirol.gv.at/fotos/Franz_Senn_Huette.jpg</caaml:fileReferenceURI>
</caaml:ExtFile>
</caaml:extFiles>