Package net.traviangui

Source Code of net.traviangui.testOverview

package net.traviangui;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

import net.traviangui.hostInterface.IOVillage;
import net.traviangui.model.Village;

import org.htmlcleaner.CleanerProperties;
import org.htmlcleaner.HtmlCleaner;
import org.htmlcleaner.PrettyXmlSerializer;
import org.htmlcleaner.TagNode;



public class testOverview
{
   
  public static void main(String[] args) throws Exception
  {
      Translator.load( "es");
     
      // create an instance of HtmlCleaner
    HtmlCleaner cleaner = new HtmlCleaner();

    // take default cleaner properties
    CleanerProperties props = cleaner.getProperties();

    // customize cleaner's behaviour with property setters
//    props.setXXX(...);

    // Clean HTML taken from simple string, file, URL, input stream,
    // input source or reader. Result is root node of created
    // tree-like structure. Single cleaner instance may be safely used
    // multiple times.
//    TagNode node = cleaner.clean( new File("tests/accept.html"));

    TagNode node = cleaner.clean( new File("tests/materias.html"));

    Village village = new Village();
        IOVillage.updateVillageOverview( village);
        System.out.println( village);


    Object[] myNodes;
        myNodes = node.evaluateXPath( "body");
       
    // serialize a node to a file, output stream, DOM, JDom...
    System.out.println( "\n\n\nINICIO");
    PrettyXmlSerializer serializer = new PrettyXmlSerializer( props);



   
//    Util.printTagNodes( myNodes);
   
    System.out.println( "FIN");

   
  }
       

}
TOP

Related Classes of net.traviangui.testOverview

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.