KML - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of KML.php
- <?php
- libxml_use_internal_errors(true);
- $sxe = simplexml_load_string('<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?><kml:kml xmlns:dwd="https://opendata.dwd.de/weather/lib/pointforecast_dwd_extension_V1_0.xsd" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:xal="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <kml:Document> <kml:ExtendedData> <dwd:ProductDefinition> <dwd:Issuer>Deutscher Wetterdienst</dwd:Issuer> <dwd:ProductID>MOSMIX</dwd:ProductID> <dwd:GeneratingProcess>DWD MOSMIX hourly, Version 1.0</dwd:GeneratingProcess> <dwd:IssueTime>2020-02-03T15:00:00.000Z</dwd:IssueTime> </dwd:ProductDefinition> </kml:ExtendedData> </kml:Document></kml:kml>');
- if ($sxe === false) {
- echo "Failed loading XML\n";
- foreach(libxml_get_errors() as $error) {
- echo "\t", $error->message;
- }
- }
- else
- {
- echo "success".PHP_EOL;
- print_r($sxe);
- }
File Description
- KML
- PHP Code
- 14 Feb-2020
- 1.04 Kb
You can Share it:
Latest PHP Pastes