- both are
<div id="one">
Note the all the h1, h2 and blockquote nodes are childs of this one. $dom->getElementById(0);
would return the first element.$dom->getElementById(1);
would return the second (if it existed)id
is the name of an attribute in this tag<div id="one">
- Do not understand the question. what do you mean by single node?
- textContent: all the texts within the childNodes (http://www.w3schools.com/dom/prop_element_textcontent.asp); nodeValue: value of a node, depending on its type http://www.w3schools.com/dom/prop_document_nodevalue.asp
- read on … this http://www.w3schools.com/htmldom/default.asp
I leave the rest to other SO users.
solved DOMDocument : some basic questions [closed]