<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>How to optimize xpath in jdom</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hello,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am using Xpath available in jdom. The xml file is of 9MB size. It is taking a lot of time to query a simple xpath like:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">/Root/Parent/Child[name=&quot;abc&quot;]/GrandChild</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am trying to get the value of the &quot;GrandChild&quot; element in the following way:</FONT>

<BR><FONT SIZE=2 FACE="Arial">((Element)org.jdom.xpath.XPath.selectSingleNode(xml_Document, xpath_expression)).getValue();</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">There are many &quot;Child&quot; elements in my huge xml file of 9MB size. Please let me know to optimize the xpath expression or any other workarounds.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Thanks in advance.</FONT>

<BR><FONT SIZE=2 FACE="Arial">Regards,</FONT>

<BR><FONT SIZE=2 FACE="Arial">Chandra</FONT>
</P>

</BODY>
</HTML>