{"id":3993,"date":"2013-09-04T05:28:13","date_gmt":"2013-09-03T19:28:13","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=3993"},"modified":"2013-09-04T05:28:13","modified_gmt":"2013-09-03T19:28:13","slug":"java-eclipse-xml-and-dtd-validate-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/java-eclipse-xml-and-dtd-validate-primer-tutorial\/","title":{"rendered":"Java Eclipse XML and DTD Validate Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/XMLValidator\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Java Eclipse XML and DTD Validate Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/XMLValidator\/Java_Eclipse_XML_DTD_Validate_Primer-99of.jpg\" title=\"Java Eclipse XML and DTD Validate Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Java Eclipse XML and DTD Validate Primer Tutorial<\/p><\/div>\n<p>The XML Validation subject area is quite complex.    The reason for this is that when there is intelligence in your data, as XML often has, it can be organized in a variety of ways.   One approach with XML data is to oversee its integrity with the use of <a target=_blank title='DTD information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Document_type_definition'>DTD schemas<\/a>, which is like a blueprint for your XML data, outlining how it should be structured to pass validation checks.   If you know your XML data passes the validation tests implied by the DTD then you are likely to have a very successful project, if the DTD has been structured methodically and has enough flexibility to express all the complication needed to satisfy business logic requirements.<\/p>\n<p>Java has functionality to help with validating XML in a variety of different scenarios, as do other languages such as Python, for example.   Here, as with Python, we are using a <a target=_blank title='SAX API information from Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Simple_API_for_XML'>SAX<\/a> approach, and for this tutorial there were two huge contributions from:<\/p>\n<ul>\n<li>the Eclipse IDE XML examples provided<\/li>\n<li>a very good tutorial <a target=_blank title='Tutorial about validating XML against a real existing DTD' href='http:\/\/www.roseindia.net\/xml\/dom\/DOMValidateDTD.shtml'>here<\/a> about validating XML against a real existing DTD<\/li>\n<\/ul>\n<p>In this primer  <a target=_blank title='click picture' href='http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/XMLValidator\/'>tutorial<\/a> you can see some Java XML and DTD validation program in action on a Mac laptop.<\/p>\n<p>Link to downloadable Java (via Eclipse) programming source code for XML and DTD validation <a target=_blank title='XMLPlusDTDValidate.java' href='http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/XMLValidator\/XMLPlusDTDValidate.java_GETME'>XMLPlusDTDValidate.java<\/a><\/p>\n<p>Link to sample Eclipse DTD data <a target=_blank title='Invoice.dtd' href='http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/XMLValidator\/Invoice.dtd_GETME'>Invoice.dtd<\/a><\/p>\n<p>Link to sample Eclipse XML data <a target=_blank title='Invoice.xml' href='http:\/\/www.rjmprogramming.com.au\/Java\/Eclipse\/XMLValidator\/Invoice.xml_GETME'>Invoice.xml<\/a><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d3993' onclick='var dv=document.getElementById(\"d3993\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?s=Python\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d3993' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The XML Validation subject area is quite complex. The reason for this is that when there is intelligence in your data, as XML often has, it can be organized in a variety of ways. One approach with XML data is &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/java-eclipse-xml-and-dtd-validate-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[368,374,644,997,1091,1319,1358,1480],"class_list":["post-3993","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-dtd","tag-eclipse","tag-java","tag-programming","tag-sax","tag-tutorial","tag-validation","tag-xml"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/3993"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=3993"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/3993\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=3993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=3993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=3993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}