Click here to Skip to main content
15,897,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I am using the following to get rid the white spaces in my xml

<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
	<xsl:strip-space elements="*" />
	<xsl:template match="node()|@*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*" />
		</xsl:copy>
	</xsl:template>

	<xsl:template match="*[not(@*) and not(*) and (not(text()))]" />

	
</xsl:stylesheet>


it is reading all elements but not striping the while spaces

can anyone help me

thanks
Posted
Updated 25-Feb-12 12:56pm
v2
Comments
Sergey Alexandrovich Kryukov 25-Feb-12 18:57pm    
Added appropriate tag.
--SA
rbjanaki 26-Feb-12 14:47pm    
where did you added the appropriate tag ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900