XmlDocument.Type type,
Optional<String> mainManifestPackageName)
throws IOException, SAXException, ParserConfigurationException {
InputStream inputStream = new BufferedInputStream(new FileInputStream(xmlFile));
PositionXmlParser positionXmlParser = new PositionXmlParser();
Document domDocument = positionXmlParser.parse(inputStream);
return domDocument != null
? new XmlDocument(positionXmlParser,
new FileSourceLocation(displayName, xmlFile),
selectors,
systemPropertyResolver,