Problems in xml parsing  
Author Message
harispra





PostPosted: 2004-12-1 19:31:00 Top

java-programmer, 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.
 
Thomas Weidenfeller





PostPosted: 2004-12-1 20:20:00 Top

java-programmer >> Problems in xml parsing 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/computer-lang/java/gui/faq
 
jmm-list-gn





PostPosted: 2004-12-2 0:29:00 Top

java-programmer >> Problems in xml parsing 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)