473,385 Members | 1,400 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,385 software developers and data experts.

Path specification problem

50
Hi...

i have an xml file and from that i need to refer to the dtds...

In my system the dtd path accepts only if it is set as
"/c:/Documents and settings/.... "

but by default it has to be set as "c:/documents and settings/..."

And because of this when i get absolute path and assign the value for opening a file or saving a file it shows error and i couldnt get the needed output.

How to resolve.... what has to be done and why is this so....

Thank you..
May 8 '09 #1
8 2117
r035198x
13,262 8TB
I don't understand the parts
In my system the dtd path accepts only if it is set as
"/c:/Documents and settings/.... "
and
but by default it has to be set as "c:/documents and settings/..."
Why don't you post what you have tried and the error message that you got.
May 8 '09 #2
uhdam
50
the error i got was null pointer.. i am sure that the path has to be set without the / in front... but it does not accept so...
May 8 '09 #3
r035198x
13,262 8TB
Like I said, post the code you used before and including the line reported for the nullpointer exception.
May 8 '09 #4
uhdam
50
i got MalformedURL exception: protocol c
May 8 '09 #5
uhdam
50
When i run my project it runs to certain extent and when it needs the support of dtd and xml it fails at that stage.

It returns error in console as
C:/Documents%20and%20Settings/Uhdam/Prj/src/xmldet/xmlinfo.xml

java.lang.NullPointerException
May 8 '09 #6
JosAH
11,448 Expert 8TB
@uhdam
You can't use an absolute file path as a URL; you have to use something like:

"file:///c:/path/to/your/file"

The first part is the protocol (your error message showed 'c', indicating that your drive designator was used as the protocol); the additional slashes are URL syntax plus path separators.

kind regards,

Jos
May 8 '09 #7
uhdam
50
Sir the dtd definition file path is to be mentioned in xml file na. in the top of xml file where i need to specify the dtd file path if i give the path as

"C:/Documents and settings/Uhdam/Prj/src/Parser/dtdefintion.dtd" it shows me error and specifies that it should be in the format as below

"/C:/Documents and settings/Uhdam/Prj/src/Parser/dtdefintion.dtd"

So when i use methodname.getAbsolutePath(); it returns an error because it wouldnt consider the / in front of drive name by default.

What to do to make the system recognize without slash in front of drive name.
May 8 '09 #8
JosAH
11,448 Expert 8TB
Did you try my suggestion? Your software wants a URL and you're not supplying a valid URL, i.e. you are supplying a file path.

kind regards,

Jos

ps. don't PM me nor try to hurry me; this problem may be urgent to you but it isn't to us nor is your problem more important to us than the other problems posted in this forum.
May 9 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ben Allfree | last post by:
The docs for os.path.isabs() state: isabs( path) Return True if path is an absolute pathname (begins with a slash). This is false becase os.path.isabs("C:\\foo") == True It should read:
4
by: Edward Diener | last post by:
Try as I might I can not find a routine in os.path which validates whether or not a path is syntactically valid, either as a directory or as a file. This is surprising since, although I know this...
2
by: Paul Drummond | last post by:
Hi all, I am developing software for Linux Redhat9 and I have noticed some very strange behaviour when throwing exceptions within a shared library. All our exceptions are derived from...
4
by: carrionk | last post by:
Hi, I'm exporting data from MSAccess to a *.txt file using VBA. I have already set up specification to TAB delimited, no Commas for Text and saved it ( .. in File>Export, etc) The problem is...
5
by: Paul | last post by:
I am trying to create a log of certain events on the website by writing them to a text file. The logging code is in an "included" file that is inserted into the pages that need to be monitored....
2
by: John Dann | last post by:
I guess there must be some convention or Windows specification for whether the backslash immediately preceding the file name in a full path string to a file is formally part of the path string or...
1
by: sumanthsclsdc | last post by:
hello friends, i am using the os.path.walk to search to filter the files with the given word, this function i m using in many modules. i just want to place this function in some class...
2
by: Radu | last post by:
Hi. I have files in the "Scorecard Previews" subfolder of the virtual path of my app, the absolute path being C:\Data\Ordering Process\Scorecard Previews\ I have a javascript function...
1
by: uhdam | last post by:
Sir the dtd definition file path is to be mentioned in xml file na. in the top of xml file where i need to specify the dtd file path if i give the path as "C:/Documents and...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.