Aller au contenu principal

xml_new

Initialise xml with a new xml.

XML_NEW

NAME

xml_new - Initialise xml with a new xml.

SYNOPSIS

xml_new(xml:string, file:string [error:variable]);

DESCRIPTION

This initialize a new xml parser with xml string or from an xml file.

PARAMETERS

xml
Specify xml to parse.
error
Capture error.
file
Specify file that contain xml.

RETURN

A pointer to the xml structure use by other functions in this module.

MODULES

To use this module, you must specify the following in /usr/local/website/site.conf:

Module xml {
        Library : "/usr/local/lib/libsnxml.so"
        Init : "snxml_init"
}

EXAMPLES

res=<{xml_new(); }>. return .*XML or file must be specified.*
res=<{xml_new(file:"a",xml:"b"); }>. return .*XML or file must be specified, not both.*
res=<{xml_new(error:t,xml:""); t.errcode; t.errmsg;}>. return res=21At line=1,errcode=21 Invalid XML..
res=<{xml=xml_new(error:t,file:"/html/cyberpresse.xml"); t.errcode; t.errmsg;}>. return res=0.
res=<{xml=xml_new(error:t,xml:'  a'); t.errcode; t.errmsg;}>. return res=0.

SEE ALSO

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.