Code example for Scanner

Methods: closeuseDelimiter

0
	 
	@Before 
	public void setUp() throws Exception { 
		basePath = new java.io.File("src/test/resources/").getCanonicalPath();
		xsdFile = basePath + "/TestXSD.xsd";		
		Scanner scanner = new Scanner(new File(basePath + "/TestXSD.xml"));
		xmlFile = scanner.useDelimiter("\\Z").next();	
		scanner.close();
		 
		String path = new java.io.File("src/test/resources/validator.properties").getCanonicalPath();
		propFile = new PropertiesFile();
		propFile.main(path);
		propFile.dataDir = new java.io.File(".").getCanonicalPath();		
	} 
 
	@Test 
	public void testMain() throws Exception { 
		Utils utils = new Utils();
		Document xmlDoc = utils.stringToXMLDOM(xmlFile);
		 
Experience pair programming with AI  Get Codota for Java