in a Java module I create a "org.w3c.dom.Node" (with java.xml.parsers.DocumentBuilder) and return it to XQuery/BaseX.