[jdom-interest] XPATH using JDOM returns null???

Anand, Rajesh Rajesh_Anand at ml.com
Fri Jul 15 07:57:12 PDT 2005


	I'm parsing an XML file using the following snippet..

	XPath xpath = XPath.newInstance("/FIXML/Batch/TrdCaptRpt");
		List nodelist = xpath.selectNodes(doc);
		Iterator nd = nodelist.iterator();
		while (nd.hasNext()){
		Element ndele = (Element) nd.next();

	This is the xml snip...

	- <>  <FIXML r="20030618" s="20040109" v="4.4" xr="FIA" xv="1"
- <>  <Batch> 
- <>  <TrdCaptRpt RptID="29770863" PrevlyRpted="N" LastQty="1"
LastPx="156.4" TrdDt="2005-07-13" TransTyp="0" RptTyp="2" TrdTyp="0"
MtchID="0043025" BizDt="2005-07-13" MtchStat="0"> 
<Instrmt Sym="VX" ID="VX" Src="8" CFI="FFICSX" MMY="200602"
MatDt="2006-02-15" Mult="100" Exch="XCBF" /> 
- <>  <RptSide Side="1" InptDev="MR" Ccy="USD" PosEfct="O"> 
<Pty ID="OCC" R="21" /> 
- <>  <Pty ID="00299" R="1"> 
<Sub ID="C" Typ="26" /> 
<Pty ID="PJZ" R="2" /> 
- <>  <RptSide Side="2" InptDev="MR" Ccy="USD" PosEfct="C"> 
<Pty ID="OCC" R="21" /> 
- <>  <Pty ID="00643" R="18"> 
<Sub ID="C" Typ="26" /> 
<Pty ID="TM1" R="26" /> 

	Why does nodelist returns NULL???

	Thanks for your help in advance.


Rajesh Anand
Email:Rajesh_anand at ml.com

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. Click here for important additional terms relating to this e-mail.     http://www.ml.com/email_terms/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20050715/12882e62/attachment.htm

More information about the jdom-interest mailing list