I want to EXACT Dublicate an xml file[xml->xml] via Java TransformerFactory classes and XSTL well I do not know how to syntax the .xsl file (java is ok)?
In this case if one file is eg 234bytes the other must be 234bytes?
I must use for-each or apply-templates or both or any?
eg. an xml:
You could just use the XSLT identity template. But even that doesn't guarantee that the output file will be byte-for-byte identical to the input file; for example the process might have normalized an unnormalized attribute value, or it might have chosen to use double quotes around attribute values where the input had single quotes.
So why not just use ordinary Java code which ignores the XML aspect of the file entirely and just copies the bytes from the input to the output?