SERPland Oracle, PL/SQL, PHP, Autos, Bungalow-Hotels and more …

17Jul/070

Oracle and XML: works with Oracle9i, 10g, 11g and higher

select xmlforest(name,vorname) as Employeedaten
from emp
where empno in (1,2)
;

<NAME>Hilton</NAME><VORNAME>Paris</VORNAME>

select xmlelement("Employee"
,xmlattributes(empno,name,vorname)
) as Employee
from emp
where empno in (1,2)
;

<Employee empno="1" NAME="Hilton" VORNAME="Paris"></Employee>