public String getRs_Value()(
............//数据库联接,查询,得到结果集
String stuff="":
if(rs.next()){
Clob clob = rs.getClob(1);
if(clob!=null){
Reader is = clob.getCharacterStream();
BufferedReader br = new BufferedReader(is);
String s = br.readLine();
while(s!=null){
stuff += s;
s=br.readLine();
}
}
}
}
public String getXmlV(String stuff){
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = null;
builder = factory.newDocumentBuilder();
Document doc = null;
doc = builder.parse( new InputSource( new StringReader( stuff ) ) );
doc.normalize();
System.out.println(" echo ");
NodeList nodeList = doc.getElementsByTagName("DATA");
System.out.println(nodeList.getLength());
for (int i = 0; i < nodeList.getLength(); i++) {
String value = doc.getElementsByTagName("VALUE").item(i).
getFirstChild().getNodeValue();
System.out.println(" value "+value);
if(key.indexOf("DOCUMENT_ID")>=0){
no = value;
break;
}
}
System.out.println("处罚或许可的文书号 : "+no);
doc.normalize();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return no;
}