Go to main content

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.

XML_CONTENT

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

SEE ALSO

{{ include("includes/modules.sn") }}

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.