Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

Parse XML file on Linux faled because of special characters

Thread view: 
pavel.orehov@gmail.com - 01 Jan 2008 11:14 GMT
Hi,

I have some web application (.war) which reads XML files on
initialialization. When I run this application on Tomcat on Widows
everything works file. However, when I run it on Tomcat on Linux/
Solaris my application can't parse an XML file, with standart DOM
parser, because it contains special characters created in the file
'^M'. Only after I remove these characters from XML file manually with
VI editor my application is able to parse an XML file.

I suppose it is a common issue and looking for the way to solve it in
a common way.

Thanks,
Pavel
Arne Vajhøj - 01 Jan 2008 15:10 GMT
> I have some web application (.war) which reads XML files on
> initialialization. When I run this application on Tomcat on Widows
[quoted text clipped - 6 lines]
> I suppose it is a common issue and looking for the way to solve it in
> a common way.

Move the XML files from Windows to Linux as text files and
not as binary files.

Then you will not have the extra CR's.

Arne
Martin Gregorie - 01 Jan 2008 16:11 GMT
>> I have some web application (.war) which reads XML files on
>> initialialization. When I run this application on Tomcat on Widows
[quoted text clipped - 11 lines]
>
> Then you will not have the extra CR's.

Or run them through the dos2unix utility after moving them. Its a
standard program and pretty fast.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.