I want to generate a pdf from an xsl template and xml parameters,
the beginning of the template is the next one:
< ?xml version="1.0" encoding="UTF-8"?> < xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" >
< xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes" encoding="UTF-8" />**
and the bebinning of the xml file:
< ?xml version="1.0" encoding="UTF-8" ?>
< GenerationReport >
< ValidationResult >
< Result >...
the error that is coming out:
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 1; Content is not allowed in prolog. at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:244) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) at es.gob.signaturereport.tools.XMLUtils.getDocumentImpl(XMLUtils.java:371) at es.gob.signaturereport.tools.XMLUtils.getDocument(XMLUtils.java:233) ... 53 more