public boolean validFile() throws NullPointerException {
		String regex = "(<notestore)(.*)(nextId=\")(\\d+)(\">)(.*)(<\\/notestore>)";
		Pattern p = Pattern.compile(regex, Pattern.DOTALL);
		Matcher m = p.matcher(data);
		
		if(m.find()) {
			regex = "(<note>)(.*?)(<\\/note>)";
			p = Pattern.compile(regex, Pattern.DOTALL);
			m = p.matcher(data);
			boolean validNote = false;
			
			while(m.find()) {
				String idRegex = "(<id>)(\\d+)(<\\/id>)";
				Pattern idP = Pattern.compile(idRegex, Pattern.DOTALL);
				Matcher idM = idP.matcher(m.group());
				if(idM.find()) { validNote = true; }
				else { return false; }

				String titleRegex = "(<title>)(.*?)(<\\/title>)";
				Pattern titleP = Pattern.compile(titleRegex, Pattern.DOTALL);
				Matcher titleM = titleP.matcher(m.group());
				if(titleM.find()) { validNote = true; }
				else { return false; }

				String contentRegex = "(<content>)(.*?)(<\\/content>)";
				Pattern contentP = Pattern.compile(contentRegex, Pattern.DOTALL);
				Matcher contentM = contentP.matcher(m.group());
				if(contentM.find()) { validNote = true; }
				else { return false; }
				
				if(validNote) {
					notesFound++;
				}
			}
			return validNote;
		}
		return false;
	}