Is there a way of retrieving HTML (and JavaScript) contained in a div element?
Now about:
//div[@id='your div']
If you don't care about performance?