public XmlPullParser getXmlParser(String name) throws IOException, SAXException {
		File file = new File(tempDir, name);
		file.deleteOnExit();
		FileWriter writer = new FileWriter(file);
		Iterator<String> it = xmlList.iterator();
		while (it.hasNext()) {
			String xml = it.next();
			writer.write(xml);
			writer.write('\n');
		}

		writer.close();
		XmlPullParser parser = XmlPullParserFactory.create(file, null, false);
		return parser;
	}
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