String password=getChildElementValue(node,"password");
return new ConnPara(connclass,url,username,password);
}
return null;
}
public ConnPara getDest()
{
Element root=loadDocument();
if( root==null)
return null;
NodeList nodes=root.getElementsByTagName("dest");
if(nodes.getLength()>0)
{
Node node=nodes.item(0);
String connclass=getChildElementValue(node,"class");
String url=getChildElementValue(node,"url");
String username=getChildElementValue(node,"user");
String password=getChildElementValue(node,"password");
return new ConnPara(connclass,url,username,password);
}
return null;
}
//得到子元素的值
private String getChildElementValue(Node
node,String subTagName) |