List of usage examples for org.dom4j Element getTextTrim
String getTextTrim();
From source file:com.poka.util.XmlSax.java
public String getLLJLFileNameL() { Document doc = load(bankFile, false); Element rootElm = doc.getRootElement(); if (rootElm == null) { rootElm = doc.addElement("root"); }/*w w w . j av a 2s . com*/ Element root1Elm = rootElm.element("lljlL"); if (root1Elm == null) { root1Elm = rootElm.addElement("lljlL"); root1Elm.setText("[0-9A-Z]*_1_[0-9]{4}_[0-9]{17}[.]FSN$"); writeToXml(doc, bankFile); return "[0-9A-Z]*_1_[0-9]{4}_[0-9]{17}[.]FSN$"; } else { return root1Elm.getTextTrim(); } }
From source file:com.poka.util.XmlSax.java
public String getLLJLFileNameC() { Document doc = load(bankFile, false); Element rootElm = doc.getRootElement(); if (rootElm == null) { rootElm = doc.addElement("root"); }/*from ww w.j a v a2 s .c o m*/ Element root1Elm = rootElm.element("lljlC"); if (root1Elm == null) { root1Elm = rootElm.addElement("lljlC"); root1Elm.setText("[0-9A-Z]*_2_[0-9]{4}_[0-9]{17}[.]FSN$"); writeToXml(doc, bankFile); return "[0-9A-Z]*_2_[0-9]{4}_[0-9]{17}[.]FSN$"; } else { return root1Elm.getTextTrim(); } }
From source file:com.poka.util.XmlSax.java
public boolean isNeedBreakQF() { Document doc = load(bankFile, false); Element rootElm = doc.getRootElement(); if (rootElm == null) { rootElm = doc.addElement("root"); }//w ww . j ava 2 s .co m Element root1Elm = rootElm.element("breadqf"); if (root1Elm == null) { root1Elm = rootElm.addElement("breadqf"); root1Elm.setText("0"); writeToXml(doc, bankFile); return false; } else { String tem = root1Elm.getTextTrim(); return tem.equals("1"); } }
From source file:com.poka.util.XmlSax.java
public boolean isNeedLogin() { Document doc = load(regis, false); Element rootElm = doc.getRootElement(); if (rootElm == null) { rootElm = doc.addElement("root"); }//from w w w. ja va 2s . c o m Element root1Elm = rootElm.element("login"); if (root1Elm == null) { return false; } else { String tem = root1Elm.getTextTrim(); return tem.equals("0"); } }
From source file:com.poka.util.XmlSax.java
public boolean isRegist() { Document doc = load(regis, false); Element rootElm = doc.getRootElement(); if (rootElm == null) { rootElm = doc.addElement("root"); }// www .j av a 2 s . co m Element root1Elm = rootElm.element("regist"); if (root1Elm == null) { return false; } else { String tem = root1Elm.getTextTrim(); String tem1 = RegistrationUtil.getRegistration(); return tem.equals(tem1); } }
From source file:com.poka.util.XmlSax.java
public String getHPort() { Document doc = load(bankFile, false); Element rootElm = doc.getRootElement(); Element root1Elm = rootElm.element("hport"); if (root1Elm == null) { return null; } else {//from ww w .ja v a2 s . c o m return root1Elm.getTextTrim(); } }
From source file:com.poka.util.XmlSax.java
public String getBnakName() { Document doc = load(bankFile, false); Element rootElm = doc.getRootElement(); Element root1Elm = rootElm.element("bankName"); if (root1Elm == null) { return null; }//from www . j a va2s.c o m Element node = root1Elm.element("name"); if (node == null) { return null; } else { return node.getTextTrim(); } }
From source file:com.poka.util.XmlSax.java
public String getMechineNO() { Document doc = load(bankFile, false); Element rootElm = doc.getRootElement(); Element root1Elm = rootElm.element("mechineNo"); if (root1Elm == null) { return null; }// w w w.j a v a 2 s. c o m Element node = root1Elm.element("title"); if (node == null) { return null; } else { return node.getTextTrim(); } }
From source file:com.poka.util.XmlSax.java
public void getArgListInfo() { this.argList = new ArrayList<Arg>(); Document doc = load(bankFile, false); Element rootElm = doc.getRootElement(); Element root1Elm = rootElm.element("args"); if (root1Elm == null) { root1Elm = rootElm.addElement("args"); }/*from ww w. j av a 2 s . c o m*/ List nodes = root1Elm.elements(); for (Iterator it = nodes.iterator(); it.hasNext();) { Element elm = (Element) it.next(); Arg cfg = new Arg(); cfg.setAkey(elm.getName().trim()); cfg.setAvalue(elm.getTextTrim()); this.argList.add(cfg); } }
From source file:com.pureinfo.srm.report.report.digital.parser.ReportParser.java
License:Open Source License
private static Map parseQueries(Document _script) { List xQueries = _script.getRootElement().element("queries").elements("query"); Map queries = new HashMap(xQueries.size()); for (Iterator iter = xQueries.iterator(); iter.hasNext();) { Element xQuery = (Element) iter.next(); queries.put(xQuery.attributeValue("id"), xQuery.getTextTrim()); }/*from w w w. j a v a2s .co m*/ return queries; }