Here is some utility Java code that I and others have written. The code (except HS Ælfred2 and the other GNU JAXP modifications) is licensed under the “MIT”/“expat” license. Please see individual source files for the exact copyright.