public function equalSearch(url:String,layerNameEng:String,searchField:String,value:String):void
{
if(url == "" || layerNameEng == "" || searchField == "")
return;
var _request:XMLRequest = new XMLRequest(url,onSuccess,onFailure);
var postXML:XML = <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2"
xmlns:topp="http://www.openplans.org/topp"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
<wfs:Query>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
</ogc:PropertyIsEqualTo >
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
var ogc:Namespace = postXML.namespace("ogc");
var wfs:Namespace = postXML.namespace("wfs");
postXML.wfs::Query.@typeName = layerNameEng;
postXML.wfs::Query.ogc::Filter.ogc::PropertyIsEqualTo.ogc::PropertyName = searchField;
postXML.wfs::Query.ogc::Filter.ogc::PropertyIsEqualTo.ogc::Literal = value;
_request.postContent = postXML;
_request.duration = 0;
_request.send();
_myXMLRequest.xmlRequestArr.push(_request);
}
Flex 操作命名空间
最新推荐文章于 2017-04-04 18:20:42 发布