Code example for Scanner

Methods: closeuseDelimiter

0
		xmlDoc = utils.stringToXMLDOM(xml);
		messages = new ArrayList<Message>();
		detectIdentifier.setVersionAndIdentifier(xmlDoc, messages);
		assertEquals(2, messages.size());
		 
		scanner = new Scanner(new File(basePath + "/InvoiceMissingCustomizationID.xml"));
		xml = scanner.useDelimiter("\\Z").next();		
		xmlDoc = utils.stringToXMLDOM(xml);
		messages = new ArrayList<Message>();
		detectIdentifier.setVersionAndIdentifier(xmlDoc, messages);
		assertEquals(2, messages.size());	
		 
		scanner.close();
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java