Advertisement

07.03.2007 at 10:57AM PDT, ID: 22673520
[x]
Attachment Details

java.net.MalformedURLException: unknown protocol: c

Asked by pdlarue in Java Programming Language

Tags: unknown, c

Experts:

I'm trying to read an XML file.  Here is my code.  

dbf = DocumentBuilderFactory.newInstance();
db  = dbf.newDocumentBuilder();
doc = db.parse(pathAndFileName);  // ensure string includes the double slashes //"c:\\vehicles.xml"); // get dom representation of file


The filepath and name are correct.  But when I get to the last line (doc = db.parse(pathAndFileName);)
I get this error:

java.net.MalformedURLException: unknown protocol: c
      at java.net.URL.<init>(Unknown Source)
      at java.net.URL.<init>(Unknown Source)
      at java.net.URL.<init>(Unknown Source)
Start Free Trial
 
 
[+][-]07.03.2007 at 10:59AM PDT, ID: 19413371

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.03.2007 at 11:11AM PDT, ID: 19413439

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2007 at 11:19AM PDT, ID: 19413505

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2007 at 11:27AM PDT, ID: 19413570

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.03.2007 at 03:28PM PDT, ID: 19415259

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: unknown, c
Sign Up Now!
Solution Provided By: objects
Participating Experts: 4
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32