Blog posts tagged with simplexml
Using SimpleXML with sfWebBrowser to parse html documents
sfWebBrowser is a class that emulates browser calls. It gives us nice object oriented interface to navigate through document structure in a programmed way. It can return response as SimpleXML which enables us to use xpath queries on the document being parsed. Unfortunately html pages are hardly ever XML valid documents. That's why in most cases sfWebBrowser rather throws and exception than returns something. Here is how we can write a workaround for it.
















