First off, you should use <cfxml>
, not <cfsavecontent>
. This way you will get a server error when you try to build an invalid XML document.
Next, the sample code you show can never include HTML tags. This means your sample code is not what you really have. You should improve your question.
Also: Indent your code.
<cfxml variable="xml_podaci" casesensitive="yes">
<PodaciPoreskeDeklaracije>
<PodaciOPrijavi>
<KlijentskaOznakaDeklaracije />
<VrstaPrijave />
<ObracunskiPeriod />
<OznakaZaKonacnu />
<DatumNastankaPoreskeObaveze />
<DatumPlacanja />
<VrstaIzmene />
<JIPD />
<BrojResenja />
<Osnov />
<NajnizaOsnovica />
</PodaciOPrijavi>
<!-- ... -->
</PodaciPoreskeDeklaracije>
</cfxml>
<cfset fajl_novi_naziv = "PPPPDPrijava.xml">
<cfheader name="Content-Disposition" value="attachment; filename=#fajl_novi_naziv#" />
<cfcontent type="application/xml;charset=utf-8" /><cfoutput>#xml_podaci#</cfoutput>