@xml_read(file:string)

parse an XML file into an Antescofo value. The argument of the function is the path of the file. Note that an XML text can be written directly in an Antescofo program after the keyword XML:: and is implicitly converted into an Antescofo value.

The encoding of an XML file into an Antescofo value is as follow :

For instance,

$m := XML:: <a>
              <b>1</b>
              <c>3.14159</c>
            </a>

will build the following Antescofo value:

$m := [ "a",
        MAP{},
        [ ["b", MAP{}, [1]],
          ["c", MAP{}, [3.14159]]
        ]
      ]

A tag with content and attributes

$m := XML::<title size="big" font="times">Hello <strong>World</strong> ! </>

is equivalent to

$m := [ "title",
        MAP{ ("font", "times"), ("size", "big") },
        ["Hello ", ["strong", MAP{}, ["World"]], " ! "]
      ]

See also @xml_string.

Data Exchange Functions: @dump,    @dumpvar,    @gnuplot,    @json_read,    @json_string,    @json_write,    @loadvalue,    @loadvar,    @nim2vezer    @plot,    @rplot,    @savevalue,    @set_osc_handling_double,    @set_osc_handling_int64,    @set_osc_handling_tab,    @string2fun,    @string2obj,    @string2proc    @xml_read    @xml_string