Configure XML parsers using helpers from the XmlUtils class to disable pulling in external entities.
This fixes the main issue and proactively fixes similar issues when external entities can be pulled in through other xml files (info plist on macOS, xml source files for MSI packages on Windows). --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Ensure external entities are ignored in l10n files - Prevent Xerces from logging errors in stderr - HostArchPkgTest: use XmlUtils.initDocumentBuilder() - Introduce XmlUtils.initTransformerFactory(); fix WiX4 source converter to make it reuse already parsed XML instead of parsing it over and over and over again. - WinMsiPackager: rewrite getCultureFromWxlFile() to make it use XmlUtils.initDocumentBuilder() for configuring XML parser - 8393938: jpackage discloses local file contents through XML external entities in app-image metadata Changes: https://git.openjdk.org/jdk/pull/34163/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=34163&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8393938 Stats: 569 lines in 10 files changed: 518 ins; 26 del; 25 mod Patch: https://git.openjdk.org/jdk/pull/34163.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/34163/head:pull/34163 PR: https://git.openjdk.org/jdk/pull/34163
