takes a UML glance at how the library is structured internally.

UML Diagrams

The library comes with two DomBinder implementations: JaxenDomBinder and JaxpDomBinder (The latter is slower, see: Performance.)

Each DomBinder implementation relies on a specific set of dynamic proxies, with a use of java.lang.reflect.InvocationHandler objects.

See the SVG version

In this diagram:

DefaultDomBinder is merely an alias for JaxenDomBinder.

By using a DomUniqueBinder, you can filter your chosen binder so it returns unique proxy instances for given org.w3c.dom.Node objects, even though they are accessed by different XPath expressions:

        final DomBinder binder = new DomUniqueBinder(new DefaultDomBinder());
        
        final Book book1 = binder.bind(document, Book.class);
        final Book book2 = binder.bind(document, Book.class);

        assertSame(book1, book2);
        
        assertSame(book1.getReferences()[0], book2.getReferenceByLang("en"));
        
        ...

See the SVG version

In this diagram: