xsl-list
[Top] [All Lists]

Re: Invalid characters

2005-07-18 11:12:45
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(_at_)gurulabs(_dot_)com>
Guru Labs, L.C.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>