Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to add attributes in the xml tag

kn_sivaramanOct 28 2009 — edited Oct 28 2009
hi,

i have two tables employee,department

employee table
--------------
empno number,
empname varchar2(100),
deptno number,


department table
----------------
deptno number,
deptname varchar2(100)

i want xml file in the above mentioned two tables.The xml file is as follows,

<?xml version="1.0" encoding="UTF-8" ?>
<EmployeeInfo>

<Data type="employee">
<empno>1</empno>
<empname>siva</empname>
<deptno>10</deptno>
</data>

<Data type="department">
<deptno>10</empno>
<deptname>IT</empname>
</data>

</EmployeeInfo>

can anybody please give plsql code for this requirement.i need to add attributes in the xml tag.Its urgent

By
Siva
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2009
Added on Oct 28 2009
10 comments
952 views