473,322 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Problems in xml parsing

Hi,
I am using XMLTool.java to convert an xml file into an xml document
and
I am parsing the xml file using Nodelist and Nodes.
NodeList ls = getElementsByTagName("xxx").
Its working fine when I am running my application in windows.

But when I am running the same application in unix, I am getting
exceptions while parsing. Its giving null value and I cannot proceed
further.

Can anybody pls suggest where I am doing wrong?
I appreciate your help.

Regards,
Hari.
Jul 17 '05 #1
2 1598
Hari Prasad wrote:
But when I am running the same application in unix, I am getting
exceptions while parsing. Its giving null value and I cannot proceed
further.


I think it is time that you start using a debugger and figuring out what
is going wrong, where and why. Chances are you made some assumption in
the code which is true on windows, but not on Unix.

/Thomas

PS: comp.lang.java is not a valid newsgroup for years now.

--
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/...g/java/gui/faq
Jul 17 '05 #2
Hari Prasad wrote:
I am using XMLTool.java to convert an xml file into an xml document
and
I am parsing the xml file using Nodelist and Nodes.
NodeList ls = getElementsByTagName("xxx").
Its working fine when I am running my application in windows.

But when I am running the same application in unix, I am getting
exceptions while parsing. Its giving null value and I cannot proceed
further.

It may be the different newline between DOSish and unixish systems.
DOSish uses two chars: CR and LF; unix only uses LF. In unix you may be
getting the extra CR instead of the string you expect.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dennis Roberts | last post by:
I have a script to parse a dns querylog and generate some statistics. For a 750MB file a perl script using the same methods (splits) can parse the file in 3 minutes. My python script takes 25...
12
by: Javier | last post by:
Hello, I'm very new in this forum and as I have the following problem, the website is in http://new.vanara.com ----------------------------------------------------------------------------...
3
by: Eric Lilja | last post by:
Hello, I'm creating a small utility for an online game. It involves parsing a text file of "tradesskill recipes" and inserting these recipes in a gui tree widget (similar to gui file browsers if...
4
by: Hugh | last post by:
Hello, I am having some problems understanding (most likely), parsing a text file. I would like to parse a file like: block1 { stuff; ... stuffN; };
1
by: Chris LaJoie | last post by:
Hi, I have an app that runs many simultaneous threads. I have noticed (took me a while to figure out what it was doing though) that sometimes if there is a problem, the thread will simply...
21
by: matvdl | last post by:
I have a system that was originally developed in asp - the pages are saved in SQL (there are over 10,000 pages) and saved to a temp directory in the server when requested by a client. I have...
15
by: manstey | last post by:
Hi, I have a text file called a.txt: # comments I read it using this:
3
by: i80and | last post by:
I'm working on a basic web spider, and I'm having problems with the urlparser. This is the effected function: ------------------------------ def FindLinks(Website): WebsiteLen = len(Website)+1...
13
by: charliefortune | last post by:
I am fetching some product feeds with PHP like this $merch = substr($key,1); $feed = file_get_contents($_POST); $fp = fopen("./feeds/feed".$merch.".txt","w+"); fwrite ($fp,$feed); fclose...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.