{"id":4740,"date":"2021-08-06T09:30:47","date_gmt":"2021-08-06T09:30:47","guid":{"rendered":"https:\/\/www.bearloga.space\/?page_id=4740"},"modified":"2021-08-06T09:30:47","modified_gmt":"2021-08-06T09:30:47","slug":"xml-dom-udalit-uzel","status":"publish","type":"page","link":"https:\/\/www.bearloga.space\/en\/xml-dom-udalit-uzel\/","title":{"rendered":"XML DOM \u2014 \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u0437\u0435\u043b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e&nbsp;<em>\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430<\/em>&nbsp;XML DOM.&nbsp;\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.&nbsp;\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b, \u0443\u0437\u0435\u043b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u043b\u0438 \u0443\u0437\u0435\u043b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>RemoveChild ()<\/li><li>removeAttribute ()<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">RemoveChild ()<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">removeAttribute ()<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">RemoveChild ()<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434&nbsp;<em>removeChild ()<\/em>&nbsp;\u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439&nbsp;<em>oldChild,<\/em>&nbsp;\u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0435\u0433\u043e.&nbsp;\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u0443\u0437\u043b\u0430 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u043e \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0443\u0437\u043b\u0430.&nbsp;\u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u0443\u0437\u043b\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043d\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0443\u0437\u0435\u043b.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f removeChild () \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Node removeChild(Node oldChild) throws DOMException\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0443\u0434\u0430,<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>oldChild<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0439 \u0443\u0437\u0435\u043b.<\/li><li>\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>oldChild<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u0443\u0434\u0430\u043b\u044f\u0435\u043c\u044b\u0439 \u0443\u0437\u0435\u043b.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0443\u0437\u0435\u043b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 (removecurrentnode_example.htm) \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 XML (&nbsp;<a href=\"https:\/\/www.tutorialspoint.com\/dom\/node.xml\" target=\"_blank\" rel=\"noreferrer noopener\">node.xml<\/a>&nbsp;) \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 DOM XML \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b &lt;ContactNo&gt; \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0443\u0437\u043b\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n   &lt;head&gt;\n      &lt;script&gt;\n         function loadXMLDoc(filename) {\n            if (window.XMLHttpRequest) {\n               xhttp = new XMLHttpRequest();\n            } else \/\/ code for IE5 and IE6 {\n               xhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n            }\n            xhttp.open(\"GET\",filename,false);\n            xhttp.send();\n            return xhttp.responseXML;\n         }\n      &lt;\/script&gt;\n   &lt;\/head&gt;\n   &lt;body&gt;\n      &lt;script&gt;\n         xmlDoc = loadXMLDoc(\"\/dom\/node.xml\");\n\n         document.write(\"&lt;b&gt;Before remove operation, total ContactNo elements: &lt;\/b&gt;\");\n         document.write(xmlDoc.getElementsByTagName(\"ContactNo\").length);\n         document.write(\"&lt;br&gt;\");\n\n         x = xmlDoc.getElementsByTagName(\"ContactNo\")[0];\n         x.parentNode.removeChild(x);\n\n         document.write(\"&lt;b&gt;After remove operation, total ContactNo elements: &lt;\/b&gt;\");\n         document.write(xmlDoc.getElementsByTagName(\"ContactNo\").length);\n      &lt;\/script&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>x = xmlDoc.getElementsByTagName (\u00abContactNo\u00bb) [0]<\/em>&nbsp;\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;ContactNo&gt;, \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 0.<\/li><li><em>x.parentNode.removeChild (\u0445);<\/em>&nbsp;\u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;ContactNo&gt;, \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 0, \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0443\u0437\u043b\u0430.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>x = xmlDoc.getElementsByTagName (\u00abContactNo\u00bb) [0]<\/em>\u00a0\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;ContactNo>, \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>x.parentNode.removeChild (\u0445);<\/em>&nbsp;\u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;ContactNo&gt;, \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 0, \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0443\u0437\u043b\u0430.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043a\u0430\u043a&nbsp;<em>removecurrentnode_example.htm<\/em>&nbsp;\u043d\u0430 \u043f\u0443\u0442\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 (\u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u0444\u0430\u0439\u043b node.xml \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043f\u0443\u0442\u0438 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435).&nbsp;\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Before remove operation, total ContactNo elements: 3\nAfter remove operation, total ContactNo elements: 2 \n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u2014 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0443\u0437\u043b\u0430<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 (removetextNode_example.htm) \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 XML (&nbsp;<a href=\"https:\/\/www.tutorialspoint.com\/dom\/node.xml\" target=\"_blank\" rel=\"noreferrer noopener\">node.xml<\/a>&nbsp;) \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 XML DOM \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b &lt;FirstName&gt;.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n   &lt;head&gt;\n      &lt;script&gt;\n         function loadXMLDoc(filename) {\n            if (window.XMLHttpRequest) {\n               xhttp = new XMLHttpRequest();\n            } else \/\/ code for IE5 and IE6 {\n                xhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n            }\n            xhttp.open(\"GET\",filename,false);\n            xhttp.send();\n            return xhttp.responseXML;\n         }\n      &lt;\/script&gt;\n   &lt;\/head&gt;\n   &lt;body&gt;\n      &lt;script&gt;\n         xmlDoc = loadXMLDoc(\"\/dom\/node.xml\");\n\n         x = xmlDoc.getElementsByTagName(\"FirstName\")[0];\n\n         document.write(\"&lt;b&gt;Text node of child node before removal is:&lt;\/b&gt; \");\n         document.write(x.childNodes.length);\n         document.write(\"&lt;br&gt;\");\n\n         y = x.childNodes[0];\n         x.removeChild(y);\n         document.write(\"&lt;b&gt;Text node of child node after removal is:&lt;\/b&gt; \");\n         document.write(x.childNodes.length);\n\n      &lt;\/script&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>x = xmlDoc.getElementsByTagName (\u00abFirstName\u00bb) [0];<\/em>&nbsp;\u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;FirstName&gt; \u0432&nbsp;<em>x,<\/em>&nbsp;\u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 0.<\/li><li><em>y = x.childNodes [0];<\/em>&nbsp;\u2014 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435&nbsp;<em>y<\/em>&nbsp;\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/li><li><em>x.removeChild (\u0443);<\/em>&nbsp;\u2014 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>x = xmlDoc.getElementsByTagName (\u00abFirstName\u00bb) [0];<\/em>&nbsp;\u2014 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 &lt;FirstName&gt; \u0432&nbsp;<em>x,<\/em>&nbsp;\u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>y = x.childNodes [0];<\/em>&nbsp;\u2014 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435&nbsp;<em>y<\/em>&nbsp;\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>x.removeChild (\u0443);<\/em>&nbsp;\u2014 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043a\u0430\u043a&nbsp;<em>removetextNode_example.htm<\/em>&nbsp;\u043d\u0430 \u043f\u0443\u0442\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 (\u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u0444\u0430\u0439\u043b node.xml \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043f\u0443\u0442\u0438 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435).&nbsp;\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u2014<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Text node of child node before removal is: 1\nText node of child node after removal is: 0 \n<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">removeAttribute ()<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434 removeAttribute () \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0438\u043c\u0435\u043d\u0438.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f&nbsp;<em>removeAttribute ()<\/em>&nbsp;\u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u2014<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">void removeAttribute(java.lang.String name) throws DOMException\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0443\u0434\u0430,<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>name<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u0438\u043c\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>name<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u0438\u043c\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u043f\u0440\u0438\u043c\u0435\u0440<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 (removeelementattribute_example.htm) \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 XML (&nbsp;<a href=\"https:\/\/www.tutorialspoint.com\/dom\/node.xml\" target=\"_blank\" rel=\"noreferrer noopener\">node.xml<\/a>&nbsp;) \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 DOM XML \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n   &lt;head&gt;\n      &lt;script&gt;\n         function loadXMLDoc(filename) {\n            if (window.XMLHttpRequest) {\n               xhttp = new XMLHttpRequest();\n            } else \/\/ code for IE5 and IE6 {\n                xhttp = new ActiveXObject(\"Microsoft.XMLHTTP\");\n            }\n            xhttp.open(\"GET\",filename,false);\n            xhttp.send();\n            return xhttp.responseXML;\n         }\n      &lt;\/script&gt;\n   &lt;\/head&gt;\n   &lt;body&gt;\n\n      &lt;script&gt;\n         xmlDoc = loadXMLDoc(\"\/dom\/node.xml\");\n\n         x = xmlDoc.getElementsByTagName('Employee');\n\n         document.write(x[1].getAttribute('category'));\n         document.write(\"&lt;br&gt;\");\n\n         x[1].removeAttribute('category');\n\n         document.write(x[1].getAttribute('category'));\n\n      &lt;\/script&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>document.write (\u0445 [1] .getAttribute ( \u2018\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u2019));<\/em>&nbsp;\u2014 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435&nbsp;<em>\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438<\/em>&nbsp;\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 1-\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/li><li><em>\u0445 [1] .removeAttribute ( \u2018\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u2019);<\/em>&nbsp;\u2014 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><em>document.write (\u0445 [1] .getAttribute ( \u2018\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u2019));<\/em>&nbsp;\u2014 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435&nbsp;<em>\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438<\/em>&nbsp;\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430, \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043d\u0430 1-\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\u0445 [1] .removeAttribute ( \u2018\u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u2019);<\/em>&nbsp;\u2014 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043a\u0430\u043a&nbsp;<em>removeelementattribute_example.htm<\/em>&nbsp;\u043d\u0430 \u043f\u0443\u0442\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 (\u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u0444\u0430\u0439\u043b node.xml \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043f\u0443\u0442\u0438 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u044d\u0442\u043e\u0439 \u0433\u043b\u0430\u0432\u0435 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044e&nbsp;\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430&nbsp;XML DOM.&nbsp;\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.&nbsp;\u042d\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[152],"tags":[],"class_list":["post-4740","page","type-page","status-publish","hentry","category-xml-dom"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/pages\/4740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/comments?post=4740"}],"version-history":[{"count":0,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/pages\/4740\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/media?parent=4740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/categories?post=4740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bearloga.space\/en\/wp-json\/wp\/v2\/tags?post=4740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}