return root; }catch( ParserConfigurationException e){ System.out.println("ParserConfigurationException"); e.printStackTrace(); }catch(IOException e) { System.out.println("IOException "); e.printStackTrace(); }catch(SAXException e) { System.out.println("SAXException "); e.printStackTrace(); }catch(Exception e) { e.printStackTrace(); } return null; } public ConnPara getSource() { Element root=loadDocument(); if( root==null) { return null; } NodeList nodes=root.getElementsByTagName("source"); if(nodes.getLength()>0) { Node node=nodes.item(0); String connclass=getChildElementValue(node,"class"); String url=getChildElementValue(node,"url"); String username=getChildElementValue(node,"user"); |