Пример #1
0
 public static XMLResult readResult(GenericFile file) {
   Node node = readXmlFile(file);
   XMLResult result = new XMLResult();
   NodeList list = node.getChildNodes();
   for (int i = 0; i < list.getLength(); i++) {
     Node n = list.item(i);
     if (n.getNodeName().equals("success")) {
       result.success = string2booleanList(n.getTextContent()).get(0);
     }
     if (n.getNodeName().equals("result")) {
       result.resultValue = new ResultValue(n);
     }
     if (n.getNodeName().equals("error")) {
       result.resultValue = new ResultValue(n);
       result.error = result.resultValue.structResult.get(0).get("identifier").charResult;
       result.message = result.resultValue.structResult.get(0).get("message").charResult;
     }
   }
   return result;
 }