Guest Prasanth K P Posted September 12, 2006 Share Posted September 12, 2006 I am totally new to XML.I tried creating an xml and validating it against dtd.But its still displaying the xml.Its not getting validated or giving errors.<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE note [ <!ELEMENT note (to, from, heading, body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)>]><note> <toc>Tove</toc> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body></note> Link to comment Share on other sites More sharing options...
boen_robot Posted September 12, 2006 Share Posted September 12, 2006 Try doing anything with the data by using a script that actually validates the input before making the query. You won't succeed at that point. The DTD makes sure of it. Link to comment Share on other sites More sharing options...
v_nai Posted September 15, 2006 Share Posted September 15, 2006 I guess you haven't validated the xml file against the dtd. You need to use any tool/xml editor (google on net) to validate. When we say validation it checks only the document against the dtd definition; dont expect any output as in any prog language.vinay. I am totally new to XML.I tried creating an xml and validating it against dtd.But its still displaying the xml.Its not getting validated or giving errors.<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE note [ <!ELEMENT note (to, from, heading, body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)>]><note> <toc>Tove</toc> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body></note> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now