<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
                                                <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-16">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>XPATH using JDOM returns null???</TITLE>
</HEAD>
                                        <BODY >
                                                <DIV>
<!-- Converted from text/rtf format -->
<P> <FONT SIZE=2 FACE="Arial">Folks,</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">I'm parsing an XML file using the following snippet..</FONT>
</P>
<P> <FONT FACE="Times New Roman">XPath xpath = XPath.newInstance("/FIXML/Batch/TrdCaptRpt");</FONT>
<BR> <FONT FACE="Times New Roman">List nodelist = xpath.selectNodes(doc);</FONT>
<BR> <FONT FACE="Times New Roman">Iterator nd = nodelist.iterator();</FONT>
<BR> <FONT FACE="Times New Roman">while (nd.hasNext()){</FONT>
<BR> <FONT FACE="Times New Roman">Element ndele = (Element) nd.next();</FONT>
<BR> <FONT FACE="Times New Roman">fix.listElements(ndele);</FONT>
<BR> <FONT FACE="Times New Roman">}</FONT>
</P>
<BR>
<P> <FONT SIZE=2 FACE="Arial">This is the xml snip…</FONT>
</P>
<P> <A HREF=""><U><FONT COLOR="#0000FF" FACE="Times New Roman">-</FONT></U></A><FONT FACE="Times New Roman"> <FIXML r="<B>20030618</B>" s="<B>20040109</B>" v="<B>4.4</B>" xr="<B>FIA</B>" xv="<B>1</B>" xmlns="<A HREF="http://www.fixprotocol.org/FIXML-4-4">http://www.fixprotocol.org/FIXML-4-4</A>"> </FONT>
<BR><A HREF=""><U><FONT COLOR="#0000FF" FACE="Times New Roman">-</FONT></U></A><FONT FACE="Times New Roman"> <Batch> </FONT>
<BR><A HREF=""><U><FONT COLOR="#0000FF" FACE="Times New Roman">-</FONT></U></A><FONT FACE="Times New Roman"> <TrdCaptRpt RptID="</FONT><B><FONT FACE="Times New Roman">29770863</FONT></B><FONT FACE="Times New Roman">" PrevlyRpted="</FONT><B><FONT FACE="Times New Roman">N</FONT></B><FONT FACE="Times New Roman">" LastQty="</FONT><B><FONT FACE="Times New Roman">1</FONT></B><FONT FACE="Times New Roman">" LastPx="</FONT><B><FONT FACE="Times New Roman">156.4</FONT></B><FONT FACE="Times New Roman">" TrdDt="</FONT><B><FONT FACE="Times New Roman">2005-07-13</FONT></B><FONT FACE="Times New Roman">" TransTyp="</FONT><B><FONT FACE="Times New Roman">0</FONT></B><FONT FACE="Times New Roman">" RptTyp="</FONT><B><FONT FACE="Times New Roman">2</FONT></B><FONT FACE="Times New Roman">" TrdTyp="</FONT><B><FONT FACE="Times New Roman">0</FONT></B><FONT FACE="Times New Roman">" MtchID="</FONT><B><FONT FACE="Times New Roman">0043025</FONT></B><FONT FACE="Times New Roman">" BizDt="</FONT><B><FONT FACE="Times New Roman">2005-07-13</FONT></B><FONT FACE="Times New Roman">" MtchStat="</FONT><B><FONT FACE="Times New Roman">0</FONT></B><FONT FACE="Times New Roman">"> </FONT></P>
<P><FONT FACE="Times New Roman"><Instrmt Sym="</FONT><B><FONT FACE="Times New Roman">VX</FONT></B><FONT FACE="Times New Roman">" ID="</FONT><B><FONT FACE="Times New Roman">VX</FONT></B><FONT FACE="Times New Roman">" Src="</FONT><B><FONT FACE="Times New Roman">8</FONT></B><FONT FACE="Times New Roman">" CFI="</FONT><B><FONT FACE="Times New Roman">FFICSX</FONT></B><FONT FACE="Times New Roman">" MMY="</FONT><B><FONT FACE="Times New Roman">200602</FONT></B><FONT FACE="Times New Roman">" MatDt="</FONT><B><FONT FACE="Times New Roman">2006-02-15</FONT></B><FONT FACE="Times New Roman">" Mult="</FONT><B><FONT FACE="Times New Roman">100</FONT></B><FONT FACE="Times New Roman">" Exch="</FONT><B><FONT FACE="Times New Roman">XCBF</FONT></B><FONT FACE="Times New Roman">" /> </FONT>
<BR><A HREF=""><U><FONT COLOR="#0000FF" FACE="Times New Roman">-</FONT></U></A><FONT FACE="Times New Roman"> <RptSide Side="</FONT><B><FONT FACE="Times New Roman">1</FONT></B><FONT FACE="Times New Roman">" InptDev="</FONT><B><FONT FACE="Times New Roman">MR</FONT></B><FONT FACE="Times New Roman">" Ccy="</FONT><B><FONT FACE="Times New Roman">USD</FONT></B><FONT FACE="Times New Roman">" PosEfct="</FONT><B><FONT FACE="Times New Roman">O</FONT></B><FONT FACE="Times New Roman">"> </FONT>
<BR><FONT FACE="Times New Roman"><Pty ID="</FONT><B><FONT FACE="Times New Roman">OCC</FONT></B><FONT FACE="Times New Roman">" R="</FONT><B><FONT FACE="Times New Roman">21</FONT></B><FONT FACE="Times New Roman">" /> </FONT>
<BR><A HREF=""><U><FONT COLOR="#0000FF" FACE="Times New Roman">-</FONT></U></A><FONT FACE="Times New Roman"> <Pty ID="</FONT><B><FONT FACE="Times New Roman">00299</FONT></B><FONT FACE="Times New Roman">" R="</FONT><B><FONT FACE="Times New Roman">1</FONT></B><FONT FACE="Times New Roman">"> </FONT>
<BR><FONT FACE="Times New Roman"><Sub ID="</FONT><B><FONT FACE="Times New Roman">C</FONT></B><FONT FACE="Times New Roman">" Typ="</FONT><B><FONT FACE="Times New Roman">26</FONT></B><FONT FACE="Times New Roman">" /> </FONT>
<BR><FONT FACE="Times New Roman"></Pty> </FONT>
<BR><FONT FACE="Times New Roman"><Pty ID="</FONT><B><FONT FACE="Times New Roman">PJZ</FONT></B><FONT FACE="Times New Roman">" R="</FONT><B><FONT FACE="Times New Roman">2</FONT></B><FONT FACE="Times New Roman">" /> </FONT>
<BR><FONT FACE="Times New Roman"></RptSide> </FONT>
<BR><A HREF=""><U><FONT COLOR="#0000FF" FACE="Times New Roman">-</FONT></U></A><FONT FACE="Times New Roman"> <RptSide Side="</FONT><B><FONT FACE="Times New Roman">2</FONT></B><FONT FACE="Times New Roman">" InptDev="</FONT><B><FONT FACE="Times New Roman">MR</FONT></B><FONT FACE="Times New Roman">" Ccy="</FONT><B><FONT FACE="Times New Roman">USD</FONT></B><FONT FACE="Times New Roman">" PosEfct="</FONT><B><FONT FACE="Times New Roman">C</FONT></B><FONT FACE="Times New Roman">"> </FONT>
<BR><FONT FACE="Times New Roman"><Pty ID="</FONT><B><FONT FACE="Times New Roman">OCC</FONT></B><FONT FACE="Times New Roman">" R="</FONT><B><FONT FACE="Times New Roman">21</FONT></B><FONT FACE="Times New Roman">" /> </FONT>
<BR><A HREF=""><U><FONT COLOR="#0000FF" FACE="Times New Roman">-</FONT></U></A><FONT FACE="Times New Roman"> <Pty ID="</FONT><B><FONT FACE="Times New Roman">00643</FONT></B><FONT FACE="Times New Roman">" R="</FONT><B><FONT FACE="Times New Roman">18</FONT></B><FONT FACE="Times New Roman">"> </FONT>
<BR><FONT FACE="Times New Roman"><Sub ID="</FONT><B><FONT FACE="Times New Roman">C</FONT></B><FONT FACE="Times New Roman">" Typ="</FONT><B><FONT FACE="Times New Roman">26</FONT></B><FONT FACE="Times New Roman">" /> </FONT>
<BR><FONT FACE="Times New Roman"></Pty> </FONT>
<BR><FONT FACE="Times New Roman"><Pty ID="</FONT><B><FONT FACE="Times New Roman">TM1</FONT></B><FONT FACE="Times New Roman">" R="</FONT><B><FONT FACE="Times New Roman">26</FONT></B><FONT FACE="Times New Roman">" /> </FONT>
<BR><FONT FACE="Times New Roman"></RptSide> </FONT>
<BR><FONT FACE="Times New Roman"></TrdCaptRpt></FONT>
</P>
<BR>
<P> <FONT SIZE=2 FACE="Arial">Why does nodelist returns NULL???</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">Thanks for your help in advance.</FONT>
</P>
<P>
</P>
<P><B><I><FONT SIZE=2 FACE="Arial">Rajesh Anand</FONT></I></B>
<BR><B><FONT SIZE=2 FACE="Arial">Email:Rajesh_anand@ml.com</FONT></B>
</P>
</DIV>
                                                <DIV>
                                                        <HR COLOR="gray">
                                                </DIV>
                                                <DIV>If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. <A HREF="http://www.ml.com/email_terms/">Click here </A>for important additional terms relating to this e-mail. <A HREF="http://www.ml.com/email_terms/">http://www.ml.com/email_terms/</A></DIV>
                                                <DIV>
                                                        <HR COLOR="gray">
                                                </DIV></BODY></HTML>