# Establishing a Generic Geographic Information Collection Platform for Heterogeneous Data
## 2 Materials and Methods
### XML Schema Definition  
XML can effectively describe and model the specifications, structures, and functions needed to solve specific domain problems and is often combined with components and frameworks to offer quick and flexible solutions [42; 43]. Currently, some collection platforms use XML configuration files to control interface generation, making the process faster and more cost-effective [28]. Therefore, we designed an XML schema for field geographic information collection tasks to define data structures, UI, and various collection tools. By reading different XML-based configuration files at runtime, our collection software can quickly adapt to different data collection scenarios. Figure 2 illustrates our XML schema design and the process of writing XML configuration files. To improve usability and reduce the learning curve, we provide a visual interface in the management system to generate these configuration files.  
We designed the XML schema comprising five components: spatial editing tools configuration, positioning tools configuration, basemap tools configuration, database table configuration, and collection content configuration. Table 2 details the XML elements and functions corresponding to each part. In the spatial editing tool configuration, positioning tool configuration, and basemap configuration sections, users can set spatial shape-editing tools, positioning tools, and basemaps for tasks. In the database tables and collection content sections, they can also customize attribute data structures. In order to allow a collection page to automatically extract additional information from user behavior, we employ the observer mode to implement three runtime scripts: value script, group script, and visibility script. These scripts enable the collection interface to adapt automatically to user actions, such as changing field visibility based on user choices.  
Figure 1: Platform architecture.  
Figure 2: XML schema definition and flow.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Element** & **Attributes** & **Description** \\ \hline \hline \textless{config}\textgreater{} & - & Root element \\ \hline \textless{meta\textgreater{}} & - & Stores the tools needed for field geographic information collection. Its sub-elements include: \textless{drawtool}, \textless{position}\textgreater{} \\  & & and \textless{basemap\textgreater{}}. \\ \hline \textless{drawtool\textgreater{}} & - & Stored geometry drawing tools. Its sub-element is \textless{type\textgreater{}}. \\ \hline \textless{position\textgreater{}} & - & Store position tools. Its sub-element is \textless{type\textgreater{}}. \\ \hline \textless{type\textgreater{}} & name & Stores positioning tool or geometric feature drawing tool. The attribute name records the corresponding tool name. \\ \hline \textless{basemap\textgreater{}} & - & Stores basemaps that can be used. Its sub-element is \textless{layer\textgreater{}} \\ \hline \textless{layer\textgreater{}} & name, index, subtype, type, group & Stores the basemap. Its attribute type is used to store the URL of the basemap, subType is used to record whether it is a vector layer or an image layer, and index is used to record the visible order of the basemap. \\ \hline \textless{tables\textgreater{}} & - & Record all attribute collection interfaces. \\ \hline \textless{tables\textgreater{}} & name, key & A table corresponds to a property collection interface and a table in the database. The table stores all the controls used in the collection interface. \\ \hline \hline \end{tabular}