How could I convert a XML Document to a Java Object (or Array)? I readed the XML like this:
DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInsta
I would look at JAX/B, which gives a way to "bind" between Java objects and XML representations.
I've got a tiny write-up of doing it with Rational Eclipse-based tooling here, but there appear to be (never used them myself) straight Eclipse plugins too, for example this.
Indeed writing JAX/B by hand is possible, gets a bit dull for complex XML, but annotations are quite easy.