I think we're talking about two different things. I'm saying that doc surely must be a full document since you are searching for /html/body/div. I agree that the output should be the inner_html of that div.