The design on AnyXmlNode requires users to perform some sort of translation to a DOMSource. Most of them are doing this eagerly, resulting in needless translations - such as NETCONF performing NormalizedNode -> DOM streaming for the purposes of creating a NormalizedNode structure.
Furthermore default org.w3c.DOM implementation is mutable, which does not sit well with immutable design of NormalizedNode.
Design a DOMSource-like extension mechanism, which allows an AnyXmlNode to be queried/ for its content in various (externally-defined) interfaces. For example YangModeledAnyXmlNode would expose the underlying schema via an accessor interface - potentially even pre-constructed NormalizedNode.
Finally this has a tie-in with YANGTOOLS-777, as AnyDataNode should use the same extension mechanism.