Skip to main content
Skip table of contents

tableToXml

You are looking at an older version of the documentation. The latest version is found here.

This procedure allows to convert a given table or view to an XML representation.

Parameters

ParameterDescription
tableNameFully qualified table or view name which should be converted to XML; mandatory

Usage

SQL
CALL "UTILS.tableToXml"(
    "tableName" => 'string_tableName'
);;

Example

In this example, we create a sample view and then convert it to XML:

SQL
CREATE VIEW views.testView
AS
SELECT 1 AS "a", 2 AS "b", 9 AS "c"
UNION ALL
SELECT 5 AS "a", 7 AS "b", 10 AS "c"
UNION ALL
SELECT 9 AS "a", 8 AS "b", 20 AS "c";;

CALL "UTILS.tableToXml"(
    "tableName" => 'views.testView'
);;

It gives the following result:

XML
<testView><row><a>1</a><b>2</b><c>9</c></row><row><a>5</a><b>7</b><c>10</c></row><row><a>9</a><b>8</b><c>20</c></row></testView>

Warning

This procedure needs a lot of memory. We recommend ensuring that your system has enough RAM available and not use it for huge tables.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.