HI All
by using XML reader i was trying to read the contents of XML file and loading into some flat file but only two rows r loading into the target
Deptno Empno Ename sal Dname
10 200 xyz2 2000 FINANCE
20 400 xyz4 4000 HR
but four rows should be there in the target.
Plz find the below XML source file
<?xml version="1.0"?>
<!-- Generated for DataStage job XMLTEST1 by XMLWriter(7.1.0. at 15:07:26 20 JUN 2004 -->
<TEST>
<TEST>
<DEPT DEPTNO="10">
<EMP>
<EMPNO>100</EMPNO>
<ENAME>XYZ</ENAME>
<SAL>1000</SAL>
</EMP>
<EMP>
<EMPNO>200</EMPNO>
<ENAME>XYZ2</ENAME>
<SAL>2000</SAL>
</EMP>
</DEPT>
<DNAME> FINANCE</DNAME>
<DEPT DEPTNO="20">
<EMP>
<EMPNO>300</EMPNO>
<ENAME>XYZ3</ENAME>
<SAL>3000</SAL>
</EMP>
<EMP>
<EMPNO>400</EMPNO>
<ENAME>XYZ4</ENAME>
<SAL>4000</SAL>
</EMP>
</DEPT>
<DNAME> HR</DNAME>
</TEST>
</TEST>
Thanks in advance.......
Prasad
Problem with XML reader
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I can only see two DEPTNO tags in your XML. This might explain why there are only two output rows, since DeptNo is a column. Also, should the DNAME tag precede the closing /DEPT tag?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.