Examples of MobcomProperties


Examples of com.mobcom.conf.MobcomProperties

  public boolean parseAsProducts(InputStream xmlStream) {
    boolean status = false;
    try {
      Document doc = _docBuilder.parse(xmlStream);
      XPath xpath = XPathFactory.newInstance().newXPath();
      MobcomProperties props = MobcomProperties.getInstance();
      Node validNode = (Node) xpath.evaluate(props.get("XPATH_VALID"), doc,
          XPathConstants.NODE);
      if(validNode != null)
        System.out.println(validNode.getTextContent());
      if(validNode == null || validNode.getTextContent().equals("False"))
      {
        Node message = (Node) xpath.evaluate(props.get("XPATH_ERRORMESSAGE"),
            doc,
            XPathConstants.NODE);
        System.out.println("Invalid xml response. " + message.getTextContent());
        return status;
      }
     
      NodeList asinList = (NodeList) xpath.evaluate(props.get("XPATH_ASIN"),
          doc, XPathConstants.NODESET);
      NodeList smallImages = (NodeList) xpath.evaluate(props.get("XPATH_SMALL_IMAGES"),
          doc, XPathConstants.NODESET);

      if(asinList == null || smallImages == null)
      {
        System.out.println("Null");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.