根据地理标记语言(GML)的应用需求,设计一种基于简单访问接口的GML数据解析方法。定义GML应用语义块,借助Xerces软件包分析GML模式,通过递归算法对GML标签进行语义判读。基于Adapter模式构建事件解析驱动,实现GML语义块数据的读取。实验结果表明,该方法可实现GML数据的查询、索引和可视化。
According to the Geography Markup Language(GML) application requirements, this paper designs a GML data parsing method based on simple API. It defines the GML application semantics, and analyzes the GML mode with Xerces. Through recursive algorithm to determine the semantics of GML tags, it builds the parser based on the adapter pattern and event-driven, and extracts GML data of semantic block. Experimental results show that this method can realize the query, index and visualization of GML data.