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

Re: Invalid characters

Subject: Re: Invalid characters
From: Stuart Jansen <sjansen@xxxxxxxxxxxx>
Date: Mon, 18 Jul 2005 12:12:45 -0600
perl invalid characters
On Mon, 2005-07-18 at 10:37 -0700, Jonathan Marenus wrote:
> When I run my XSL, I get an error related to invalid
> characters in my XML.  Is there a simple way I can get
> rid of these, since the file is very large and it
> would take a while to go line by line?

As already mentioned, the problem is probably one of encoding. Any
automated solution includes the possibility of corruption. That said,
there are a number of solutions you might try:

If you have the Java JDK installed, you might have the program
native2ascii installed.

Alternatively, on my Linux box I have the recode and iconv commands.

Finally, if the problem is merely a character in the high ascii range,
the following perl command with strip out anything greater than ascii
128.

perl -e 's/[\x80-\xFF]//g' -p Work/Xiphias/xsl/escape.xml

-- 
Stuart Jansen <sjansen@xxxxxxxxxxxx>
Guru Labs, L.C.

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.