<!--
 -  
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2018 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  
-->
<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry id="XS-E-0">
  <refmeta>
    <refentrytitle>XML from Data Base Examples</refentrytitle>
    <refmiscinfo>tutorial</refmiscinfo>
  </refmeta>
  <refnamediv>
    <refname>Overview</refname>
    <refpurpose>XMLELEMENT() function.</refpurpose>
  </refnamediv>

<refsect1 id="SX-E-0a">
<title>XMLELEMENT() function. Overview</title>

<para>XMLELEMENT takes an element name for identifier, an optional collection of attributes for the element, 
    and arguments that make up the element&apos;s content. 
    It returns an XML element. The second parameter may be omitted and at that time the 
    rest parameters may be present. If one of the arguments is a call of the <function>xpath_eval</function> returning 
    an attribute value, then this value would be added to element&apos;s content (not to element&apos;s attributes).
</para>
</refsect1>

<refsect1 id="SX-E-0b">
<title>XMLATTRIBUTES() function. Overview</title>
<para>
   This function creates a vector that may be used only as argument of 
   <function>XMLELEMENT</function> function. The vector has an even number of elements, each odd element is a name of an attribute, an
   even element is its value. If the attribute value is NULL, then no attribute and no value is created.
   If none of the attribute is created, then the function returns null.
   If a parameter of the function is a column name, then you can omit the &apos;AS clause&apos;, and Virtuoso uses the partially escaped form of 
   the column name as the attribute name. 
</para>
</refsect1>

<refsect1 id="SX-E-0c">
<title>sx_e_? Demos</title>
<para>
   Countinue with the next sx_e_? demos to see examples of functoins usage
</para>
</refsect1>

</refentry>