Solved

Can <x:parse be non validating ?

Posted on 2004-04-01
2
294 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
Riverbed Technology's webinar discusses networking for the cloud era with simplified SD-WAN cloud connectivity.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

830 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