[Solved] DOMDocument : some basic questions [closed]


  1. both are <div id="one"> Note the all the h1, h2 and blockquote nodes are childs of this one.
  2. $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">
  3. Do not understand the question. what do you mean by single node?
  4. 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
  5. read on … this http://www.w3schools.com/htmldom/default.asp

I leave the rest to other SO users.

solved DOMDocument : some basic questions [closed]