Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> How to generate XML customized output in oracle 9.2 ?
Hi,
I want to generate following XML output using SQL
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="CLIENT">
<xs:element name="TRANSACTION">
<xs:complexType>
<xs:sequence>
<xs:element name="MessageCode">
<xs:simpleType>
<xs:restriction base="xs:0100">
<xs:pattern value="0100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EMPNO">
<xs:simpleType>
<xs:restriction base="xs:xxxx"> => EMP NO
<xs:minLength value="1" />
<xs:maxLength value="4" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ENAME">
<xs:simpleType>
<xs:restriction base="xs:xxxx"> => ENAME
<xs:minLength value="1" />
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="JOB"> - <xs:simpleType> - <xs:restriction base="xs:xxxx"> => JOB
Can you show me how to generate above output using SQLX function using "EMP" table ? I am sure it is easily possible but sorry I do not have this skill.
Kindly suggest me urgently
thanks & regards
PJP
Received on Sun Jan 14 2007 - 08:16:50 CST
![]() |
![]() |