function

xml_content . xml . sncode

VERSIONlatest Read the value of a node, this can be either the text carried directly by this node if it’s a TEXT node or the aggregate string of the values carried by this node child’s (TEXT and ENTITY_REF). Entity references are substituted.

XML_CONTENT(1e)

NAME

xml_content - Read the value of a node, this can be either the text carried directly by this node if it’s a TEXT node or the aggregate string of the values carried by this node child’s (TEXT and ENTITY_REF). Entity references are substituted.

SYNOPSIS

xml_content(xml:string, [error:variable]);

DESCRIPTION

Read the value of a node, this can be either the text carried directly by this node if it’s a TEXT node or the aggregate string of the values carried by this node child’s (TEXT and ENTITY_REF). Entity references are substituted.

PARAMETERS

xml
Specify xml to parse.
error
Capture error.

RETURN

String of the content.

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=xml_new(error:t,file:"/html/test.xml");
     %include "/includes/xml.sn";
     xml_content(xml);
     xml_free(xml);
}>. return res=
     laplante
         bilodeau
.

the file test.xml:


        laplante
        bilodeau

AUTHOR

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