[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Removing white space from XML file

Subject: Re: Removing white space from XML file
From: "Rashmi Rubdi" <rashmi.sub@xxxxxxxxx>
Date: Wed, 11 Apr 2007 23:06:17 -0400
Re:  Removing white space from XML file
On 4/11/07, Chad Chelius <cchelius@xxxxxxxxxxxxxxx> wrote:
be one space instead of several. I know this can be accomplished with
a find change in many programs, but it would be great if I could
remove these extra spaces using an XSLT.

I think if you set indent="no" in the xsl:output tag of your XSL, it removes all the extra white spaces between the XML nodes (I tested this a while ago, if my memory is right then it should work).

<xsl:output method="xml" omit-xml-declaration="no" indent="no"/>

If you know Ant, another way to remove extra white spaces is with
Apache Ant Build.
as shown in the example here:
http://ant.apache.org/manual/OptionalTasks/replaceregexp.html

-Rashmi

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.