• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validating parser with no DOCTYPE

 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • 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 ]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic