{"id":1737,"date":"2011-03-22T10:54:08","date_gmt":"2011-03-22T05:24:08","guid":{"rendered":"http:\/\/JitendraZaa.com\/blog\/?p=1737"},"modified":"2011-03-22T10:54:08","modified_gmt":"2011-03-22T05:24:08","slug":"dom-document-object-module","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/java\/dom-document-object-module\/","title":{"rendered":"DOM \u2013 Document Object Module"},"content":{"rendered":"<p>According to the DOM, everything in an XML document is a <strong>node<\/strong>.<br \/>\nThe DOM says:<\/p>\n<ul>\n<li>The entire document is a document node<\/li>\n<li>Every XML element is an element node<\/li>\n<li>The text in the XML elements are text nodes<\/li>\n<li>Every attribute is an attribute node<\/li>\n<li>Comments are comment nodes<\/li>\n<\/ul>\n<p><!--more-->Example :<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;Bollywood&gt;\n&lt;Movie name=\"RaOne\"\u009d&gt;\nGoing to release in Dec 2011\n&lt;Actor&gt;\n\tShahrukh Khan\n&lt;\/Actor&gt;\n&lt;Production&gt;\n\tRed Chilly\n&lt;\/Production&gt;\n&lt;\/Movie&gt;\n&lt;\/BollyWood&gt;\n<\/pre>\n<p style=\"text-align: center;\"><a href=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/Diagramatical-representation-of-DOM.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1738 aligncenter\" title=\"Diagramatical representation of DOM\" src=\"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/Diagramatical-representation-of-DOM.jpg?resize=439%2C299&#038;ssl=1\" alt=\"Diagramatical representation of DOM\" width=\"439\" height=\"299\" \/><\/a><\/p>\n<p>As shown in above example and image:<\/p>\n<ul>\n<li>Parent Element name is &#8220;Movie&#8221;\u009d.<\/li>\n<li>This Element have attribute, which is &#8220;name&#8221;\u009d and attribute has a value &#8220;RaOne&#8221;\u009d.<\/li>\n<li>This Element has a text &#8220;Going to release in Dec2011&#8243;\u009d which is Text Node.<\/li>\n<li>The element has two child nodes: Actor and Production which are known as Element Node.<\/li>\n<li>Element &#8220;Actor&#8221;\u009d has text node &#8220;Sharukh Khan&#8221;\u009d and Element &#8220;Production&#8221;\u009d has text node &#8220;Red Chilly&#8221;\u009d.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What is DOM in JAVA. DOM stands for Document Object Module<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[227],"class_list":["post-1737","post","type-post","status-publish","format-standard","hentry","category-java","tag-xml"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1756,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/searching-xml-file-using-dom-parser-of-jaxp\/","url_meta":{"origin":1737,"position":0},"title":"Searching XML File using DOM Parser of JAXP","author":"Jitendra","date":"March 22, 2011","format":false,"excerpt":"Example of Searching XML File using DOM Parser of JAXP","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1753,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/traverse-xml-file-using-dom-parser-of-jaxp\/","url_meta":{"origin":1737,"position":1},"title":"Traverse XML file using DOM Parser of JAXP","author":"Jitendra","date":"March 22, 2011","format":false,"excerpt":"Example of Traverse XML file using DOM Parser of JAXP","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1750,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/create-xml-file-using-jaxp-and-transformation-apis\/","url_meta":{"origin":1737,"position":2},"title":"Create XML File using DOM Parser of JAXP and Transformation APIs","author":"Jitendra","date":"March 22, 2011","format":false,"excerpt":"Example of Creating XML File using JAXP and Transformation APIs","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1742,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/introduction-to-jaxp\/","url_meta":{"origin":1737,"position":3},"title":"Introduction to JAXP and Difference between JAXP and JAXB","author":"Jitendra","date":"March 22, 2011","format":false,"excerpt":"Introduction to JAXP (JAVA API for XML Processing), SAX (Simple API for XML Parsing),Extensible Style sheet language transformation (XSLT)","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"XML Processing using DOM in JAXP","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/XML-Processing-using-DOM-in-JAXP.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1774,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/difference-between-sax-and-dom-parsers\/","url_meta":{"origin":1737,"position":4},"title":"Difference between SAX and DOM Parsers","author":"Jitendra","date":"March 22, 2011","format":false,"excerpt":"What is the difference between SAX And DOM Parsers","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1767,"url":"https:\/\/www.jitendrazaa.com\/blog\/java\/xml-tree-viewer-using-sax-parser-in-java-with-jtreejfilechooser-component-of-swing\/","url_meta":{"origin":1737,"position":5},"title":"XML Tree Viewer using SAX Parser in JAVA with Jtree,JFileChooser component of Swing","author":"Jitendra","date":"March 22, 2011","format":false,"excerpt":"XML Tree Viewer using SAX Parser in JAVA with Jtree,JFileChooser component of Swing, How to refresh Jtree when content changes , Expand or collapse JTree","rel":"","context":"In &quot;JAVA&quot;","block_context":{"text":"JAVA","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/java\/"},"img":{"alt_text":"XML Tree Viewer using SAX Parser in JAVA","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2011\/03\/XML-Tree-Viewer-using-SAX-Parser-in-JAVA.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=1737"}],"version-history":[{"count":0,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/1737\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=1737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=1737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=1737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}