Flex 操作命名空间

论坛 期权论坛 脚本     
匿名技术用户   2021-1-4 07:29   41   0
  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);
  }

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP