public void compareXml(File file) throws Exception {
		Msg.debug(this, "reading test file from: " + file);
		Iterator<String> it = xmlList.iterator();
		BufferedReader reader = new BufferedReader(new FileReader(file));
		try {
			String line;
			int linenum = 0;
			while ((line = reader.readLine()) != null && it.hasNext()) {
				++linenum;
				String compareLine = it.next();
				if (!compareLine.equals(line)) {
					System.out.println("XML not Equal (line:" + linenum + ")");
					System.out.println("   " + compareLine);
					System.out.println("   " + line);
				}
				Assert.assertEquals("Line " + linenum + " not equal: ", compareLine, line);
			}
			if (line != null) {
				Assert.fail("XML File contains unexpected line: " + line);
			}
		}
		finally {
			reader.close();
		}
		if (it.hasNext()) {
			Assert.fail("XML contains unexpected line: " + it.next());
		}
	}
Read an XML file as a resource.

@param pkg
           where resource resides
@param name
           name of the resource that is in the given package
@throws IOException thrown if there was a problem accessing the xml resource.
Ghidra/Features/Base/src/main/java/ghidra/util/xml/XmlTestHelper.java