Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with DTD Processing

 
Pragati Desai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a SAXParser for parsing the XML file.My DTD file does not have the encoding attribute set in the header. Its has only
<?xml version="1.0"?>
When I try to parse the XML file I get the SAXParseException "more pseudo attributes required !"
It works pefectly fine if I set the encoding attribute in the header of the DTD as
<?xml version="1.0" encoding="utf-8"?>
But I dont want to specify the encoding.
Is there any way to overcome this problem?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which parser implementation (including a version) are you using?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And please do not cross-post the same question to several forums.
I deleted the one moved here by Matthew.
 
Pragati Desai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using JAXP 1.2
 
Pragati Desai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried with xerces-1_4_4 by Apache also
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, is the <?xml ...?> prolog in your DTD file (i.e. not in the XML file)? Try removing that -- you don't need it there anyway.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic