| Welcome to WebmasterWorld Guest from 18.104.22.168 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|xpath saveHTML - how?|
I'm stuck. Is there a way to effectively xpath to an html table and then save all of that tables html? The following is what I mean but of course it doesn't work.
$doc = new DOMDocument();
$xpath = new DOMXPath($doc);
$x = $xpath->query("//div[@id='A-Div-Test']/table");
save - to where? another text file?
Assuming your HTML is also valid XML, if you get the right XPATH, you should be able to select it and convert it into a string.
perhaps DOMXPath::evaluate would do the trick?
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved