摘要:
有时候需要将Unix时间戳转换成我们能看懂的形式,可采用如下函数:public String TimeStamp2Date(String timestampString){ Long timestamp = Long.parseLong(timestampString)*1000; String date = new java.text.SimpleDateFormat(""yyyy-MM-dd HH:mm:ss").format(new java.util.Date(timestamp)); return date; } 阅读全文
摘要:
获取DocumentSAXReader saxReader = new SAXReader();Document document = saxReader.read(FileUtil.getFileInputStream(fileName));查询ElementString xpath ="/composites/composite[@type='onDelete']";//查询属性type='ondDelete'的compositeList composites = document.selectNodes(xpath);xpath语法选取 阅读全文