Examples of loadFromXML()


Examples of barrysoft.options.Options.loadFromXML()

    } catch (IOException e) {
      fail(e.getMessage());
    }
   
    Options options2 = new Options();
    options2.loadFromXML(doc.getFirstChild());
   
    checkValues(options2);
   
    options2.printOptions();
       
View Full Code Here

Examples of barrysoft.web.Parser.loadFromXML()

    } catch (IOException e) {
      fail(e.getMessage());
    }
   
    Parser p2 = new Parser();
    p2.loadFromXML(doc.getFirstChild());
   
    assertEquals(p2.getRulesCount(), regexs.length);
   
    for (int i=0; i < p2.getRulesCount(); i++) {
     
View Full Code Here

Examples of barrysoft.web.WebDownloader.loadFromXML()

        fail(e.getMessage());
      } catch (IOException e) {
        fail(e.getMessage());
      }
     
      downloader.loadFromXML(doc.getFirstChild());
     
      assertEquals(source, downloader.getXML(0));
     
    } catch (MalformedURLException e) {
      fail(e.getMessage());
View Full Code Here

Examples of barrysoft.xml.XMLizable.loadFromXML()

      Node n = loadNode(ce.getId(), nodes);

      if (n == null)
        continue;

      object.loadFromXML(n);

    }
  }
 
  protected Node loadNode(String idValue, NodeList nodes) {
View Full Code Here

Examples of com.agiletec.aps.util.ApsProperties.loadFromXml()

    try {
      if (null == this.getQuestionId() || null == this.getStrutsAction()) {
        this.addActionError(this.getText("message.surveyAction.cannotProceed"));
        return INPUT;
      }
      prop.loadFromXml(xml);
      if (this.getStrutsAction() == ApsAdminSystemConstants.EDIT) {
        this.addActionError(this.getText("message.choiceAction.unexpextedAction", new String[]{this.getText("_choice"), this.getText("freeText")}));
        return INPUT;
      }
      choice = new Choice();
View Full Code Here

Examples of java.util.Properties.loadFromXML()

    public static Map<String, File> loadListFriendsSources(final File initFile, final File dataPath) {
        final Properties p = new Properties();
        final Map<String, File> m = new HashMap<String, File>();
        try {
            p.loadFromXML(new FileInputStream(initFile));
        } catch (final IOException e) {
            Log.logException(e);
            return m;
        }
        for (final Entry<Object, Object> e: p.entrySet()) m.put((String) e.getKey(), new File(dataPath, (String) e.getValue()));
View Full Code Here

Examples of java.util.Properties.loadFromXML()

   * @throws IOException
   */
  public static Properties loadProperties (InputStream input, boolean xml) throws IOException {
    try {
      Properties properties = new Properties();
      if (xml) properties.loadFromXML(input); else properties.load(input);
      return properties;
    } finally {
      input.close();
    }
  }
View Full Code Here

Examples of java.util.Properties.loadFromXML()

     */
    private long loadVersion(File propertiesfile) {
        long result = CachedRepositoryImpl.UNCOMMITTED_VERSION;
        try {
            Properties props = new Properties();
            props.loadFromXML(new FileInputStream(propertiesfile));
            result = Long.parseLong((String) props.get(VERSION));
        }
        catch (IOException ioe) {
            // We have no data; no problem.
        }
View Full Code Here

Examples of java.util.Properties.loadFromXML()

                final Properties p = new Properties();
                in.mark(1);
                boolean isXml = in.read() == '<';
                in.reset();
                if (isXml) {
                    p.loadFromXML(in);
                } else {
                    p.load(in);
                }
                final Enumeration<Object> i = p.keys();
                while ( i.hasMoreElements() ) {
View Full Code Here

Examples of java.util.Properties.loadFromXML()

  }

  protected void load(Object object, InputStream inputStream) throws Exception {
    Properties properties = (Properties) object;
    if (isXml) {
      properties.loadFromXML(inputStream);
    } else {
      properties.load(inputStream);
    }
  }
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.