I want to generate a pdf from a xml file. but i don't want to load a xml file from the disk, i want to generate from a dom (org.w3c.dom.Document),
That's a FAQ. Look into the archives, for example here: http://marc.theaimsgroup.com/?l=fop-user&m=101709066011469&w=2
J.Pietschmann