Name

xte_node_from_nodebld — Returns the vector corresponding to a XML element

Synopsis

xte_node_from_nodebld ( in head any ,
inout element any );

Description

This function replaces the first item of the second argument by the first argument and returns a vector corresponding to an XML element.

Parameters

head

This argument is a vector returned by xte_head() function

element

This argument is a vector created by xte_nodebld _int() function and then filled by xte_nodebld_acc and xte_nodebld_final() functions

Errors

Table24.123.Errors signalled by xte_node_from_nodebld

SQLState Error Code Error Text Description
22003 SR349 Too few arguments for xte_node_from_nodebld
22003 SR350 The second argument of xte_node_from_nodebld is not made by xte_nodebld_init() function

Examples

Example24.489.Simple Use

The vector res below is corresponding to the following XML element:

<product><supplier CompanyName="Seller"></supplier></product>

create procedure test_nodebld()
              {
                declare acc any;
                declare res any;
                xte_nodebld_init (acc);
                xte_nodebld_acc(acc,xte_node(xte_head ('supplier', 'CompanyName','Seller')));
                acc:=xte_nodebld_final(acc);
                res:=xte_node_from_nodebld(xte_head('product'), acc);
                result (length(res), xml_tree_doc (res));
              };
test_nodebld()
ResLen      Res
INTEGER     VARCHAR
_______________________________________________________________________________

2           <product><supplier CompanyName="Seller" /></product>