[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Removing white space from XML file
Hi, Chad,
XSLT has a function to handle at least part of the problem: xsl:normalize-space. normalize-space removes leading and trailing spaces and reduces any spaces within the value it receives to one space. So, " one two " becomes "one two". HTH Jay Bryant Bryant Communication Services ----- Original Message ----- From: "Chad Chelius" <cchelius@xxxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, April 11, 2007 7:25 PM Subject: Removing white space from XML file I am being supplied an XML file that contains white space in both the value of elements and also in the general structure of the XML file. Most often in the value of each element there are several spaces but sometimes there are other spaces as well. Is there an easy way to remove these? Also, within the value of each element, there needs to 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|