|
|
|
|
- Presentación
- ¿Cómo proceder?
- Método
- Ejemplos
XML: Uso de archivos de más de varios gigabytes
A partir de la versión 23, WINDEV, WEBDEV y WINDEV Mobile incluyen un analizador XML para los archivos XML de manipular que tienen un tamaño de varios GB: por ejemplo, Open Street Map o Open Data France. La velocidad de lectura y el consumo de memoria se mejoran en los archivos XML enormemente. De hecho, el archivo no se carga en la memoria: sólo se navega. Método Para leer un archivo XML grande con el analizador XML: - Abra el archivo XML para leerlo con XMLOpenReader. Esta función se utiliza para inicializar una xmlReader Variable.
Por ejemplo:
Reader is xmlReader = XMLOpenReader("MyFile.xml")
- Examinar el XML utilizando una sintaxis FOR EACH.
- Las propiedades de xmlReader Variable se utilizan para encontrar las características del elemento leído.
Ejemplos El siguiente ejemplo presenta un archivo xml y diferentes modos de navegación con la lista de elementos explorados.
< ?xml version="1.0"?>
<aa>
<bb>
Text1
<cc>
</cc>
</bb>
<bb>
<cc>
</cc>
</bb>
</aa> // Loop through a level // Reader is the variable corresponding to the XML file FOR EACH Reader // Read the start aa and end aa tags FOR EACH Reader // Read the start bb, end bb, start bb, end bb tags FOR EACH Reader // Read Text1 and the start cc, end cc // start cc, end cc tags END END END
// Reader is the variable corresponding to the XML file FOR EACH Reader IN-DEPTH // Read the start aa, start bb, text1, // start cc, end cc, end bb, start bb, // start cc, end cc, end bb, end aa tags END
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|