您的位置:首页 > 其它

Flex 操作命名空间

2013-08-26 17:00 393 查看
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);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: