php - How can i get some part of html using XPath? -


I need to get some part of html pages using the php XPath query (sorry, new to XPath ).

Example html page

  & lt; Html & gt; & Lt; Head & gt; Blah Line & lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "mytable" & gt; & Lt; Table & gt; & Lt; Tr & gt; & Lt; Td> Table cell cost & lt; / Td> & Lt; / Tr & gt; & Lt; / Table & gt; & Lt; / Div & gt; K & lt; Body & gt; & Lt; Html & gt;  

Is there any way to get the div content of the example above with the HTML tag using the Except?

The following xpath query will return" mytable "div:

  // div [@ id = 'mytable']  


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -