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

reference to a DTD that resides in a jar file

Hi,

I have a java program that reads it's settings from an .xml config
file with a refernce to a .dtd file but I want to store the .dtd in
the .jar file with the rest of the programs resources.
Anyone know how I'd write a doctype tag for this?
The .jar could be moved around on the server as could the .dtd so I
don't want to write an absolute path in the doctype declaration.
Jul 20 '05 #1
1 1584


avishosh wrote:

I have a java program that reads it's settings from an .xml config
file with a refernce to a .dtd file but I want to store the .dtd in
the .jar file with the rest of the programs resources.
Anyone know how I'd write a doctype tag for this?
The .jar could be moved around on the server as could the .dtd so I
don't want to write an absolute path in the doctype declaration.


What are you using to parse? If you are using SAX then maybe it is
possible to implement your own org.xml.sax.EntityResolver, at least its
documentation says

If a SAX application needs to implement customized handling for external
entities, it must implement this interface and register an instance with
the SAX driver using the setEntityResolver method.

The XML reader will then allow the application to intercept any external
entities (including the external DTD subset and external parameter
entities, if any) before including them.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

3
by: Michael Sgier | last post by:
Hi I get the error: `Unload' undeclared (first use this function) but I did in main.cpp: CMD2Model *myModel = new CMD2Model; here ( also in main.cpp) I get the above error:
9
by: Sandy | last post by:
Hi, In one of my interview I was asked a question, whether using pointers for argument is efficient then reference or not. i.e. void fun(Complex *p) void fun(Complex &ref) can somebody...
3
by: RF | last post by:
Hi All, How can I use the *.lib as a reference in a C# solution. Whenever I try to add a "lib" file, VS throws an error explaining it must have a dll extension? Can anyone help? Thankx,
3
by: Adam | last post by:
We have a web site that uses .vb for the web pages and .cs for a class module. We are getting the error in .NET 2.0 and VS 2005 beta 2. It does work with .NET 1.1. When trying to access a page...
12
by: lesperancer | last post by:
I've got two MDBs, that due to size, security, etc, need to be kept separate quotation configurator (there will be more of these in the future) so within quotation.mdb, I linked all the...
9
by: needin4mation | last post by:
I have a .aspx file and it's src. I also have a third file, a class that the src references. Everything is in the same directory/folder. Everything has the same namespace. How do I reference the...
4
by: chu2ch | last post by:
Good Afternoon Folks, Im kinda in a pickle. I have created a .net 2.0 dll written in vb.net that needs to reside in a folder on a networked computer ( for compatibility with another program)....
1
by: ashjas | last post by:
Hello, i am trying to compile a code(main.cpp) which uses a function that is declared in a header file that is within the directory where the main.cpp file resides so the header is included as ...
11
by: =?Utf-8?B?UGFycm90?= | last post by:
I get an error when trying to add a reference to a DLL program from a Realia COBOL program that is 32 bit. The error message says "Please make sure the file is accessible and that it is a valid...
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
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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.