贴上源代码:
private static String Connction() throws Exception
{
Collection col = null;
String driver =
"org.apache.xindice.client.xmldb.DatabaseImpl";
Class c = Class.forName(driver);
Database database =(Database)c.newInstance();
DatabaseManager.registerDatabase(database);
col = DatabaseManager.getCollection("xmldb:xindice:///db/zkj/");
//与xindice数据库相连接
jTextArea1.append( "successful\n");
String[] doccount = null;
String[] docpath = null;
doccount = col.listResources();
//得到zkj下的所有的xml文件,并且把文件名放到doccount中
return docpath;
}
private static String Connction() throws Exception
{
Collection col = null;
String driver =
"org.apache.xindice.client.xmldb.DatabaseImpl";
Class c = Class.forName(driver);
Database database =(Database)c.newInstance();
DatabaseManager.registerDatabase(database);
col = DatabaseManager.getCollection("xmldb:xindice:///db/zkj/");
//与xindice数据库相连接
jTextArea1.append( "successful\n");
String[] doccount = null;
String[] docpath = null;
doccount = col.listResources();
//得到zkj下的所有的xml文件,并且把文件名放到doccount中
return docpath;
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货