Solved

Can <x:parse be non validating ?

Posted on 2004-04-01
2
283 Views
Last Modified: 2010-05-18
I am extracting XML from a dbase and using jstl xml tag library to parse and display the xml.  The problem I have is that the XML contains a DOCTYPE with a relative DTD declaration eg.

<!DOCTYPE CustomerLoopService SYSTEM "CustomerLoopService.dtd">

As I do not have the DTD and no one knows where it is I get the following error when parsing.

java.io.FileNotFoundException: Could not resolve entity reference: "CustomerLoopService.dtd"
      at weblogic.xml.jaxp.ChainingEntityResolver.resolveEntity(ChainingEntityResolver.java:87)
      at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:768)
      at weblogic.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalSubset(DefaultEntityHandler.java:583)
      at weblogic.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1161)
      at weblogic.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2189)
      at weblogic.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2143)
      at weblogic.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:856)
      at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:399)
      at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1147)
      at weblogic.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:203)
      at weblogic.xml.jaxp.RegistryDocumentBuilder.parse(RegistryDocumentBuilder.java:144)

What I want to know is rather than stripping out the line

<!DOCTYPE CustomerLoopService SYSTEM "CustomerLoopService.dtd">

Can I specify to the <x:parse tag that I want it to be non validating and as a result ignore the DTD declaration ?

Thanks
0
Comment
Question by:crazyman
  • 2
2 Comments
 
LVL 6

Expert Comment

by:jarasa
ID: 10731170
I guess not but maybe you can generate the dtd from the XML if you have a good one.

Javier
0
 
LVL 6

Accepted Solution

by:
jarasa earned 500 total points
ID: 10731196
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now