|
|
|
|
|
- Overview
- How to?
- Method
- Examples
XML: Handling large (multi-gigabyte) files
WINDEV, WEBDEV and WINDEV Mobile 23 and later feature a XML parser for handling large (multi-gigabyte) XML files. Some examples include data from Open Street Map or Open Data France. Reading speed and memory consumption are significantly improved on large XML files. The file is not loaded into memory, it is simply read. Method To read a large XML file with the XML parser: - Open the XML file to read with XMLOpenReader. This function is used initialize a variable of type xmlReader.
For example:
Reader is xmlReader = XMLOpenReader("MyFile.xml")
- Loop through the XML file using one of the FOR EACH syntaxes.
- The properties of xmlReader variable are used to find the characteristics of element read.
Examples The example below present an xml file and different browse modes with the list of elements browsed.
<?xml version="1.0"?>
<aa>
<bb>
Text1
<cc>
</cc>
</bb>
<bb>
<cc>
</cc>
</bb>
</aa>
FOR EACH Reader
FOR EACH Reader
FOR EACH Reader
END
END
END
FOR EACH Reader IN-DEPTH
END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|