[jdom-interest] Jdom & Xpath error in IDE
Victor Toni
victor.toni at ebuconnect.de
Tue Jun 14 04:02:15 PDT 2005
Anand, Rajesh wrote:
> * Hi Folks,*
>
> * Here is my code snippet.*
>
> * import org.jdom.Element;*
>
import org.jdom.JDOMException; // maybe this one helps you
> * import org.jdom.xpath.XPath;*
> * import org.w3c.dom.Document;*
> * import org.xml.sax.SAXException;*
> * *
> * try {*
> * Document doc = parseXmlFile(args[2], false);*
> * *
> * XPath xpath =
> XPath.newInstance("/Envelope/Body/IndexServiceRequest/BeginDate");*
> * *
> * Element ele = (Element)
> xpath.selectSingleNode(doc);*
> * *
> * if(ele != null){*
> * *
> * ele.setText(args[0]);*
> * *
> * } *
> * *
> * GetIndexService pf = new
> GetIndexService();*
> * *
> * pf.url = new URL(s);*
> * *
> * pf.submitData();*
> * *
> * }*
> * catch (MalformedURLException e) {*
> * *
> * System.err.println(args[0] + "is not
> a URL I understand") ;*
> * } *
> * _ catch (JDOMException e){_*
> * *
> * }*
> * *
>
> * The problem is that the IDE complains that "JDOM exception
> cannot be resolved".*
>
> * However, if I remove the JDOMException , then the IDE
> complains - "Unhandled exception type JDOM".*
>
> * Can someone please help.*
>
> * Thanks in advance.*
>
> */Rajesh Anand/*
> *Tel: + (44) (0) 207 996 1152*
> *Mob: + (44) (0) 7947273151*
> *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
> <http://www.ml.com/email_terms/>for important additional terms
> relating to this e-mail. http://www.ml.com/email_terms/
> ------------------------------------------------------------------------
>
>------------------------------------------------------------------------
>
>_______________________________________________
>To control your jdom-interest membership:
>http://www.jdom.org/mailman/options/jdom-interest/youraddr@yourhost.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20050614/3823dd8c/attachment.htm
More information about the jdom-interest
mailing list