• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Problem related with valid parsers

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I want to check whether my document is the well formed xml doc or the valid xml doc. I'm testing this with the help of DTD's. I wrote the complete DTD to one of my xml doc.
Here is the small example:
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE Message [
<!ELEMENT Message (myMessage)>
<!ATTLIST Message id CDATA #FIXED "2">
<!ELEMENT myMessage (#PCDATA)>
]>
<Message id="4">
<myMessage> This is my message </myMessage>
</Message>
For the above xml file when I executed it on IE 5.0 it is showing the data perfectly.
My doubt is: In the DTD I kept the attribute value as fixed to "2". But in the message element I gave the value for id as "4". If the valid parser do the parsing for this, It has to show the error message like Invalid XML document. But I'm not getting any error message. That means here only the well-formed xml parser is doing the process and displaying the data on the browser???
Any wrong interpretation done by me or it is the problem with the browser???
Pls. help me out regarding this...
Thanks in Advance,
Raseswari.
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried using any of the parsers?
 
Raseswari Achanta
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ajith,
I didn't make use of any parsers. But I think IE5.0 will have the parsers required for doing process to my simple xml application.
Regards,
raseswari.
 
Raseswari Achanta
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
Looking for ur answer to continue further....
Pls. don't let me down
Thanks in Advance,
Raseswari.
 
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic