Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6022551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:52:26+00:00 2026-05-23T03:52:26+00:00

I have some XML that I’m parsing with a SAX parser in Java. It

  • 0

I have some XML that I’m parsing with a SAX parser in Java. It starts with this preamble:

<!DOCTYPE math 
    PUBLIC "-//W3C//DTD MathML 3.0//EN"
           "http://www.w3.org/Math/DTD/mathml3/mathml3.dtd">

How do I change this to use a local DTD?

I suppose I could do something like this:

<!DOCTYPE math 
    PUBLIC "-//W3C//DTD MathML 3.0//EN"
           "file:///c:/MathML/mathml3.dtd">

Not exactly like that, but something like that. However, I need the path to be independent of the user’s system.

How do I use a local DTD with a path relative to the class path?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:52:26+00:00Added an answer on May 23, 2026 at 3:52 am

    Take a look at this article on using XML catalogs to resolve DTDs locally without having to modify your XML source. The basic steps are:

    1. create an XML file that maps system IDs to local DTDs
    2. modify your code to instantiate and configure a CatalogResolver
    3. provide the CatalogResolver to the XML Reader (obtained from the parser)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some XML code that looks like this <SEARCHRESULTS> <FUNCTION name=BarGraph> <PARAMETER name=numList></PARAMETER>
Grettings! I have some XML that looks like this: <Root> <SectionA> <Item id=111> <Options>
I have some XML that looks something like this: <Root> <Documents> <Document id=1/> </Documents>
I have some XML that I am parsing in jQuery. <payload> <value key=VehicleMake> <value
I have some XML that looks like this: <abc x={></abc> I want to force
I have some xml that looks like this... <tbody> <tr> <td> <h5> <a class=foo
I have some xml that looks like this: <rootElement attribute=' > '/> This is
I have some Java code that takes an XML (SOAP) message and returns the
I have some xml that looks like this: <?xml version=1.0?> <data> <items> <item><timestamp>2011-07-11T09:01:42Z</timestamp><title><![CDATA[ some
I have a file which is an XML representation of some data that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.