Module xml

A simple XML Parser and Pretty-printer.

Intended as a small portable way to access common configuration file formats. not for heavy lifting!

See test-xml.c

Functions

xml_parse_string (str, is_data) convert an XML string to data.
xml_parse_file (file, is_data) convert an XML file to data.
xml_tag (doc) tag name of an element.
xml_attribs (doc) attributes of an element (as an SMap).
xml_children (doc, plen) children nodes of an element; returns length in plen.
xml_tostring (doc, indent) Pretty-print an XML document


Functions

xml_parse_string (str, is_data)
convert an XML string to data.

Parameters:

  • str const char *
  • is_data bool

Returns:

    PValue
xml_parse_file (file, is_data)
convert an XML file to data.

Parameters:

  • file const char *
  • is_data bool

Returns:

    PValue
xml_tag (doc)
tag name of an element.

Parameters:

  • doc PValue *

Returns:

    const char *
xml_attribs (doc)
attributes of an element (as an SMap).

Parameters:

  • doc PValue *

Returns:

    char * *
xml_children (doc, plen)
children nodes of an element; returns length in plen.

Parameters:

  • doc PValue *
  • plen int *

Returns:

    PValue *
xml_tostring (doc, indent)
Pretty-print an XML document

Parameters:

  • doc PValue
  • indent int

Returns:

    char *
generated by LDoc 1.4.3 Last updated 2015-04-27 12:35:55