• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Validating parser with no DOCTYPE

 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way to create a validating SAX parser for a document that doesn't have a DOCTYPE in it? I'm using Xerces, so any non-standard way of doing this may work for me, too. Thanks.
[ April 27, 2005: Message edited by: Nathaniel Stoddard ]
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the little time I could muster, I read about this (in XML Bible & the Spec.) and I am not very convinced that you could do this.

Part of the DOCTYPE declaration is that you declare the root element. You don't have to declare the DTD. That you can just provide a URL and get away with. As far as the root element, if all of your XML files have the same root element, then maybe this is possible. I have some doubts that this is the case you are trying to solve.

My wish: I wish I had the time to just write up some sample XML files and try a few things, but well I am struggling to juggle things between work, life and the other.

Sorry if it sounds like I am venting, I wish I had a more concrete answer.

- m
 
reply
    Bookmark Topic Watch Topic
  • New Topic