Database Reference
In-Depth Information
Figure 17.4
XML Element
Tags.
applying an eXtensible Style Sheet (XSL) to each repeating group
item in the XML document.
Let's explain various functions by example, that being the easiest method
to communicate details. The first example shown by the following script
and in Figure 17.4 simply creates XML element tags for three columns in
the ARTIST table:
SELECT XMLELEMENT( "Artist"
,
XMLELEMENT
("Name", A.NAME)
,
XMLELEMENT
("City", A.CITY)
,
("Country", A.COUNTRY)).GETSTRINGVAL()
FROM ARTIST A;
XMLELEMENT
The next example shown following and in Figure 17.5 shows a mixture
of elements and tag attributes for the same columns shown in Figure 17.4:
SELECT XMLELEMENT(
"Artist",
XMLATTRIBUTES
(A.NAME AS "Name")
Search WWH ::




Custom Search