www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
xmlagg
xmlattributes
xmladdattribute
xmlappendchildren
xmlconcat
xmlelement
xmlforest
xmlinsertafter
xmlinsertbefore
xmlreplace
xmltype.xmltype
xmltype.createnonsch...
xmltype.createschema...
xmltype.createxml
xmltype.existsnode
xmltype.extract
xmltype.getclobval
xmltype.getnamespace
xmltype.getnumval
xmltype.getrooteleme...
xmltype.getschemaurl
xmltype.getstringval
xmltype.isfragment
xmltype.isschemabase...
xmltype.isschemavali...
xmltype.isschemavali...
xmltype.schemavalida...
xmltype.setschemaval...
xmltype.toobject
xmltype.transform
xmlupdate
xper navigation
createxml
isentity
serialize_to_utf8_xm...
tidy_html
tidy_list_errors
updatexml
xml_add_system_path
xml_auto
xml_auto_dtd
xml_auto_schema
xml_create_tables_fr...
xml_cut
xml_doc_output_optio...
xml_get_system_paths
xml_load_mapping_sch...
xml_load_schema_decl
xml_namespace_scope
xml_persistent
xml_set_ns_decl
xml_template
xml_tree
xml_tree_doc
xml_tree_doc_media_t...
xml_uri_get
xml_validate_dtd
xml_validate_schema
xml_view_dtd
xml_view_schema
xmlsql_update
xpath_eval
xper_cut
xper_doc
xper_locate_words
xpf_extension
xpf_extension_remove
xquery_eval
xslt
xslt_format_number
xslt_sheet
xslt_stale
xte_head
xte_node
xte_node_from_nodebl...
xte_nodebld_acc
xte_nodebld_final
xte_nodebld_init
xtree_doc
XPATH & XQUERY

Functions Index

xte_nodebld_final

Corrects input vector
xte_nodebld_final (inout arg any, [in head any]);
Description

By default this function reduces all last empty items from the first argument and returns it, but supplied a second argument it also replaces the first item of the first argument by the second argument, but does not commit the return.

Parameters
arg – The vector created by the xte_nodebld_init() and filled by xte_nodebld_acc() function
head – A vector returned by xte_head() function
Errors
SQLState Error Code Error Text Description
22003 SR347 Too few arguments for xte_nodebld_final
22003 SR348 The first argument of xte_node_nodebld_final is not made by xte_nodebld_init() function

Examples
xte_nodebld_final() with a single argument.

Before the xte_nodebld_final() call the length of the vector acc is equal to 16, after the call the length is 3. The vector acc does not correspond to a xml document - there is no a root tag. The result of the xte_nodebld_final() may be used as argument for xte_node_from_nodebld() to get a vector corresponding to complete xml document.

create procedure test1_nodebld()
              {
                declare acc any;
                xte_nodebld_init (acc);
                xte_nodebld_acc (acc,'string1', string2');
		xte_nodebld_acc(acc, 'string3',xte_node(xte_head ('supplier', 'CompanyName','Seller')));
        	acc:=xte_nodebld_final(acc);
	         	    . . . 
	      } 
       
xte_nodebld_final() with two arguments.

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

<product>string1string2string3

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

</product>

create procedure test2_nodebld()
              {
                declare acc any;
                declare "Res" any;
                declare "ResLen" integer;
                result_names ("ResLen", "Res");
                xte_nodebld_init (acc);
                xte_nodebld_acc (acc,'string1', 'string2');
                xte_nodebld_acc(acc, 'string3',xte_node(xte_head ('supplier', 'CompanyName','Seller')));
        	xte_nodebld_final(acc, xte_head('product'));
		result (length(acc), xml_tree_doc (acc));
	      }
test_nodebld()
ResLen      Res
INTEGER     VARCHAR
_______________________________________________________________________________
 
3           <product>string1string2string3<supplier CompanyName="Seller" /></product>
      
See Also

xte_head()

xte_node()

xte_node_from_nodebld()

xte_nodebld_acc()

xte_nodebld_init()