There's Apache POI which is intended for working with Office documents, so directly using XML parsers might not be necessary.

The MCPB format seems to be able to run external processes, even if there's a Node in the middle. So you could also compile the Java version to a native binary with GraalVM and ship that as an MCPB.