<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Node Relationship Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/node-relationship/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/node-relationship/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Wed, 13 Apr 2022 16:30:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>What is the use of the document object model in JavaScript?</title>
		<link>https://www.scmgalaxy.com/tutorials/what-is-the-use-of-the-document-object-model-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/what-is-the-use-of-the-document-object-model-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 11:48:02 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[document object]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Node]]></category>
		<category><![CDATA[Node Relationship]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7483</guid>

					<description><![CDATA[<p>Document Object Model The Document Object Model (DOM) is an Application Programming Interface (API) for HTML and XML documents. With [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-is-the-use-of-the-document-object-model-in-javascript/">What is the use of the document object model in JavaScript?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>Document Object Model</strong></h2>



<ul class="wp-block-list"><li>The Document Object Model (DOM) is an Application Programming Interface (API) for HTML and XML documents.</li><li>With the Document Object Model, programmers can create and build documents, navigate their structure, and add, modify, or delete elements and content.</li><li>The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript.</li><li>The DOM model represents a document with a logical tree.</li><li>According to Document Object Model (DOM), every HTML-tag is an object. Nested tags are called “children” of the enclosing one. All operations on the DOM start with the document object. From it, we can access any node.</li><li>The Document Object Model can be used with any programming language.</li></ul>



<h2 class="wp-block-heading"><strong>DOM Levels</strong></h2>



<ul class="wp-block-list"><li>DOM Level 0 – This level supports the common document object collections – form[ ], image[ ], anchors[ ], links[ ] and applets[ ]. This is also known as classic or traditional JavaScript Object Model. • </li></ul>



<ul class="wp-block-list"><li>DOM Level 1- It provides the ability to manipulate all elements in a document through a common set of functions. In this level, all elements are exposed and parts of the page can be read and written to at all times. </li></ul>



<ul class="wp-block-list"><li> DOM Level 2 – It provides further access to page elements primarily related to CSS and focuses on combining Level 0 and Level 1 while adding improved support for working with XML documents.</li></ul>



<h2 class="wp-block-heading"><strong>DOM Levels</strong></h2>



<ul class="wp-block-list"><li>DOM Level 3 – Enhanced Level of Level 1 and Level 2 and added support for XPath and keyboard event handling.</li></ul>



<ul class="wp-block-list"><li>DOM Level 4 – Enhanced  year 2015</li></ul>



<h2 class="wp-block-heading"><strong>Categories of DOM</strong></h2>



<ul class="wp-block-list"><li>DOM Core – It specifies a generic model for viewing and manipulating a marked-up document as a tree structure.</li></ul>



<ul class="wp-block-list"><li>DOM HTML – It specifies an extension to the core DOM for use with HTML. This represents DOM Level 0 with capabilities for manipulating all of the HTML element objects.</li></ul>



<ul class="wp-block-list"><li>DOM CSS – It specifies the interfaces necessary to manipulate CSS rules programmatically.</li></ul>



<ul class="wp-block-list"><li>DOM Events – It adds event handling to the DOM.</li></ul>



<ul class="wp-block-list"><li>DOM XML – It specifies an extension to the Core Dom for use with XML.</li></ul>



<h2 class="wp-block-heading"><strong>Document Tree</strong></h2>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="600" height="300" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/document-tree.png" alt="" class="wp-image-7485" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/document-tree.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/document-tree-300x150.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" width="558" height="348" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/document-tree-code.png" alt="" class="wp-image-7486" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/document-tree-code.png 558w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/08/document-tree-code-300x187.png 300w" sizes="(max-width: 558px) 100vw, 558px" /></figure>



<h2 class="wp-block-heading"><strong>DOM Node Types</strong></h2>



<figure class="wp-block-table"><table><tbody><tr><td><strong>Constant</strong></td><td class="has-text-align-center" data-align="center"><strong>Node Type</strong></td><td><strong>Description</strong></td></tr><tr><td>Node.ELEMENT_NODE</td><td class="has-text-align-center" data-align="center">1</td><td>An element such as &lt;h1> or &lt;div></td></tr><tr><td>Node.TEXT_NODE</td><td class="has-text-align-center" data-align="center">3</td><td>The actual Text of Element or Attribute ex: &#8211; “Hello”</td></tr><tr><td>Node.PROCESSING_INSTRUCTION_NODE</td><td class="has-text-align-center" data-align="center">7</td><td>An instruction to a parser on aspect of the document &lt;?xml version=“1.0”?></td></tr><tr><td>Node.COMMENT_NODE</td><td class="has-text-align-center" data-align="center">8</td><td>A comment such as &lt; &#8211; &#8211; Something &#8211; &#8211; ></td></tr><tr><td>Node.DOCUMENT_NODE</td><td class="has-text-align-center" data-align="center">9</td><td>A Document Node</td></tr><tr><td>Node.DOCUMENT_TYPE_NODE</td><td class="has-text-align-center" data-align="center">10</td><td>A doctype statement &lt;!DOCTYPE html></td></tr><tr><td>Node.DOCUMENT_FRAGMENT_NODE</td><td class="has-text-align-center" data-align="center">11</td><td>A document fragment, which represents a lightweight structure to hold a collection of DOM nodes for manipulation or insertion.</td></tr></tbody></table></figure>



<h2 class="wp-block-heading"><strong>Node Relationship</strong></h2>



<ul class="wp-block-list"><li><strong>Parent</strong></li><li><strong>Children</strong></li><li><strong>First Child</strong></li><li><strong>Previous Sibling</strong></li><li><strong>Next Sibling</strong></li><li><strong>Last child</strong></li></ul>



<h2 class="wp-block-heading"><strong>DOM Node Properties</strong></h2>



<figure class="wp-block-table"><table><tbody><tr><td class="has-text-align-center" data-align="center"><strong>Properties</strong></td><td><strong>Description</strong></td></tr><tr><td class="has-text-align-center" data-align="center">nodeName</td><td>Contains the name of the node</td></tr><tr><td class="has-text-align-center" data-align="center">nodeValue</td><td>Contains the value within the node; generally only applicable to text nodes</td></tr><tr><td class="has-text-align-center" data-align="center">nodeType</td><td>Holds a number corresponding to the type of node</td></tr><tr><td class="has-text-align-center" data-align="center">parentNode</td><td>Reference to the parent node of the element, if one exists</td></tr><tr><td class="has-text-align-center" data-align="center">childNodes</td><td>Access to the list of child nodes</td></tr><tr><td class="has-text-align-center" data-align="center">firstChild</td><td>Reference to the first child node of the element, if one exists</td></tr><tr><td class="has-text-align-center" data-align="center">lastChild</td><td>Points to the last child node of the element, if one exists</td></tr><tr><td class="has-text-align-center" data-align="center">previousSibling</td><td>Reference to the previous sibling of the node; for example, if its parent node has multiple children</td></tr><tr><td class="has-text-align-center" data-align="center">nextSibling</td><td>Reference to the next sibling of the node; for example, if its parent node has multiple children</td></tr><tr><td class="has-text-align-center" data-align="center">attributes</td><td>The list of the attributes for the element</td></tr><tr><td class="has-text-align-center" data-align="center">ownerDocument</td><td>Points to the HTML Document object in which the element is contained</td></tr></tbody></table></figure>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/what-is-the-use-of-the-document-object-model-in-javascript/">What is the use of the document object model in JavaScript?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/what-is-the-use-of-the-document-object-model-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
