title: html parsing and drawing a visual representation of the dom tree PHP
body: <p>I am trying to create a web service that takes a url, and returns a graphic representation of it's html tree, or xml. I am trying to parse the html/xml via DOM. Problem is i don't know their structure, and i can't find anywhere a way of parsing a html/xml independent of it's strucuture. </p>
  
  <p>Also a way to draw the tree, i am thinking of using svg for a vectorial representation but for raster representation i dont know what to use. Can anyone help me with some ideas?or some links?</p>