Hi,
I am useing SAX for XML parsing. I need to parse a file wich is reside in the location "c:\xml\1234242345\name.xml."
And i am trying to parse the same from different location. i.e from "weblogic class path directory".Then it is giving file not found.
ex:
org.w3c.dom.Document doc=(org.w3c.dom.Document)docbuilder.parse("c:xml\xml-log.xml");
if i placed the same file at the weblogic class path folder it is parseing the file.But i need to place it out side.
regards,
Vara prasad
-
document parsing XML (SAX) (1 messages)
- Posted by: varaprasad pola
- Posted on: January 05 2005 06:17 EST
Threaded Messages (1)
- document parsing XML (SAX) by Pampa S B on January 06 2005 00:16 EST
-
document parsing XML (SAX)[ Go to top ]
- Posted by: Pampa S B
- Posted on: January 06 2005 00:16 EST
- in response to varaprasad pola
Hi,
Check the file path.....as you know java takes "\" as escape character.....so your code segment shuld like this.....
org.w3c.dom.Document doc=(org.w3c.dom.Document)docbuilder.parse("c:\\xml
xml-log.xml");....This should work fine for you.
In your code segment what parse() method receives is "c:xmlxml-log.xml"....this isnt your file...so it throws you file not found exception....
Regards