title: Xerces behaving differently on SUN JRE v1.5 and IBM J9 v1.5
body: <p>I am trying to parse some HTML using <a href="http://nekohtml.sourceforge.net/" rel="nofollow">NekoHTML</a>. </p>
  
  <p>The problem is that when the below code snippet is executed on the <code>SUN JDK 1.5.0_01</code> it works fine (this is when i am using eclipse with sun jre). But when the same thing is executed on <code>IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223ifx-20070323 (JIT enabled)</code> then it is not working (this is when i am using the IBM RAD for development).</p>
  
  <pre><code>NodeList tags = doc.getElementsByTagName("td"); 
  
  for (int i = 0; i &lt; tags.getLength(); i++) 
  {
   Element elem = (Element) tags.item(i);
   // do something with elem
  }
  </code></pre>
  
  <p>By working fine I mean that I am getting a list of "td" elements which I can process further. In case of the J9 I am not entering the <code>for</code> loop.</p>
  
  <p>I am using latest version of NekoHTML (along with the bundled Xerces jars). The <code>doc</code> in the above code is of type <code>org.w3.dom.Document</code> (the runtime class used is <code>org.apache.html.dom.HTMLDocumentImpl</code>)</p>
  
  <p>The IBM J9 details are as follows:</p>
  
  <pre><code>java version "1.5.0"
  Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20070323 (ifix 117674: SR4 + 116644 + 114941 + 116110 + 114881))
  IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223ifx-20070323 (JIT enabled)
  J9VM - 20070322_12058_lHdSMR
  JIT  - 20070109_1805ifx3_r8
  GC   - WASIFIX_2007)
  JCL  - 20070131
  </code></pre>
  
  <p>Any idea, suggestion or workaround is appreciated. Thanks.</p>