I´m getting this error... java.lang.IllegalArgumentException: The input node can not be null for a DOMSource for newTemplates!
It´s probably because the xml has tags like this <seguroEmitido>
Definitely not. It seems you passed a null value as a document node to the DOMSource constructor, in other words, you screwed up the DOM document creation.
J.Pietschmann