title: Difference between a DOM tree parsing and a syntax tree parsing?
body: <p>After parsing HTML or XML file, we can get the DOM tree.</p>
  
  <p>After parsing C, C++, or JavaScript, we can get the Syntax tree.</p>
  
  <p>Note that the syntax tree is constructed based on the context-free grammar which specifies a valid C/C++/JS program. </p>
  
  <p>But it seems the DOM tree is just a pure hierarchy structure specified only by the HTML/XML file. Is that true? Is that the reason that Schema Validation has been done after parsing? What is the fundamental difference between these two kinds of parse trees?</p>