[Mapbender-commits] r9784 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Sep 29 03:17:49 PDT 2017
Author: armin11
Date: 2017-09-29 03:17:49 -0700 (Fri, 29 Sep 2017)
New Revision: 9784
Modified:
trunk/mapbender/http/classes/class_wfs_2_0_factory.php
Log:
Fix for xml parsing in case of wfs 2.0
Modified: trunk/mapbender/http/classes/class_wfs_2_0_factory.php
===================================================================
--- trunk/mapbender/http/classes/class_wfs_2_0_factory.php 2017-09-29 09:58:21 UTC (rev 9783)
+++ trunk/mapbender/http/classes/class_wfs_2_0_factory.php 2017-09-29 10:17:49 UTC (rev 9784)
@@ -412,7 +412,7 @@
$myWfs->transaction = html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Operation[@name="Transaction"]/ows:DCP/ows:HTTP/ows:Post/@xlink:href', $wfs20Cap));
//get supported formats [mimetypes]
- $myWfs->wfsOutputFormatArray = html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Parameter[@name="outputFormat"]/ows:AllowedValues/ows:Value', $wfs20Cap));
+ $myWfs->wfsOutputFormatArray = html_entity_decode($this->getValue($xpath, '/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Parameter[@name="outputFormat"]/ows:AllowedValues/ows:Value/text()', $wfs20Cap));
//$wfs11Cap->xpath('/wfs:WFS_Capabilities/ows:OperationsMetadata/ows:Operation[@name="GetFeature"]/ows:Parameter[@name="outputFormat"]/ows:Value');
//get list of featuretypes
@@ -431,7 +431,10 @@
$featuretype_crsArray[] = $crs;
}
$featuretypeOutputFormats = array();
- $outputFormats = $featureType->OutputFormats->Format;
+
+ $outputFormats = $this->getValue($xpath, './wfs:OutputFormats/wfs:Format/text()', $featureType);
+ //$featureType->OutputFormats->Format;
+
foreach ($outputFormats as $outputFormat) {
$featuretypeOutputFormats[] = $outputFormat;
$e = new mb_exception("class_wfs_2_0_factory.php: add outputFormat for WFS: ".$outputFormat);
More information about the Mapbender_commits
mailing list