How do I remove the BOM character from my xml file [duplicate]
This question already has an answer here: XML - Data At Root Level is Invalid 2 answers I am using xsl to control the output of my xml file, but the BOM character is being added. # vim file.xml :set nobomb :wq Anthony Faull The File BOM Detector (freeware for Windows) makes it easy to remove the byte order mark. just need to add this in your xslt file: <xsl:output method="text" encoding="ASCII"/> Just strip first two bytes using any hex editor. Remove the BOM symbol from string with XSLT is pretty simple: <xsl:value-of select="translate(StringWithBOM,'','')"/> I was under the impression that