public boolean filterXML(File file, String expression) {
		Document doc = parseDocument(file);

		// xpath.setNamespaceContext(new PersonalNamespaceContext());
		try {

			
			XPathExpression expr = xpath.compile(expression);

			Object result = expr.evaluate(doc);

			if (result != null) {
				if (result instanceof String) {

					String res = (String) result;
					try {
						double d = Double.parseDouble(res);
						System.out.println("Double value is:" + d);
						if (d > 0)
							return true;
						else
							return false;

					} catch (NumberFormatException ex) {

						if (res.equalsIgnoreCase("true"))
							return true;
						else if (res.equalsIgnoreCase("false"))
							return false;
						else {

							if (res.equals(""))
								return false;
							else
								return true;
						}
					}

				}

				else {

					return false;
					// throw new XPathFunctionException(
					// "Could not convert argument type");
				}
			}

			return false;
		} catch (XPathExpressionException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return false;
		}

	}