File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes illegal  XML element .......but no error why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "illegal  XML element .......but no error why?" Watch "illegal  XML element .......but no error why?" New topic

illegal XML element .......but no error why?

Harish Tiruvile
Ranch Hand

Joined: Dec 01, 2005
Posts: 99
Hi all,

We are using DTD to define legal elements in XML file...that means if we add illegal elements it should indicate error.

But in the following example...while declaring elements in DTD i have mentioned that in xml file both fname and lname should present in any




Ouput from internet explore version 6.0


As per declaration i should get error because i have not included lname in XML file...but i am not getting error Why?

I have altered Name element declaration as follows ,still i am not getting error

if it is not giving Error then what is the use of DTD...i mean how it is restricting the applications from entering illegal elements in to xml file

If anybody knows please tell me the reason...
[ June 22, 2006: Message edited by: harish thrivile ]

Giving up is the easiest thing in the world to do..but holding it together when everything seems like falling apart is true strength!!
with regards, Harish.T
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

So you are asking about the XML parser built into IE 6.0? Looks like it's a non-validating parser.
I agree. Here's the link:
subject: illegal XML element .......but no error why?
It's not a secret anymore!