Command: xmlread

Syntax

xmlread <xmlfile>,<ident

Description

Read an XML file into a Fire object.

Parameters

Switches

Notes

XML comments, DTD and XSL specifications are ignored during parsing.

Data values may be loaded into structure members of the following types: string, numeric, point, time and blob. Appropriate data coercion will be done automatically.

Example

Read an xml file into a Fire object.

# Define an appropriate Fire structure
    atable mytab
    structure ~mytab.poi_t {
        string name
        time date
        numeric id
        point location
    }
# Create an object of the type
    ~mytab.poit_t warmem
# Read xml file contents into it, the outer tag must be poi
    xmlread  warmem.xml,warmem,-tag='poi'

An example xml file for use with the above, named warmem.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<poi> <name>War Memorial</name> <id>6512</id> <location>(25466,71625)</location> <date>18-Dec-1919</date> </poi>

See Also

Commands:

blob, structure

Functions:

xmltest

Structures:

.xmltag