Scraping specific text from a webpage using xpath

I've searched and tried multiple ways to get this but I'm not sure why it won't find most of the information on the webpage. Page to scrape: Info needed: Version number for PhotoDirect for Apple (currently 4.4.0) ...
more »

2017-10-04 23:10 (1) Answers

Xpath "not" includes elements regardless

My code returns the text only from the body of a webpage. I am trying to remove text from class="menu" items from the body of this page: <div id="pre-header-links-inner" class="header-links"><ul id="menu-top-bar" class="menu"><li id=...
more »

2017-09-15 06:09 (1) Answers

Extract part of XML file

I have a big XML file w/ repeating parts in it. How can i extract these parts 'as is' one-by-one in Java? As i said file is huge so i can't load it into memory. What technology/library should i use to iterate through the file and in each iteration e...
more »

2017-09-12 08:09 (0) Answers

Undefined property: DOMElement::$wholeText

I'm getting the following error: Undefined property: DOMElement::$wholeText" when I loop over the query and try to echo the wholeText result. $try = $xpath->query('//h2/following-sibling::ul/li | //h2/following-sibling::h3/text()'); foreach($try...
more »

2017-09-09 23:09 (2) Answers

Format Date of XML Attribute Value Using XSLT

I'm running into an issue with an XSLT Transformation I'm trying to do. In the overall project, I'm working to convert an XML document to a CSV file for a database upload. The problem is the XML sends dates as an attribute value in ISO8601 format (YY...
more »

2017-08-13 19:08 (2) Answers

How does firepath finds unique xpath on click

I am very curious to know how does firepath finds a unique xpath locator with in seconds as soon as we click on element. I know how to query xpath using firepath, but what I want to know that which language or technology has been used to developed su...
more »

2017-07-05 14:07 (1) Answers

DomxPath query do not return a nodelist

I've been working on some practice application involving xPaths and Retrieving elements from other website. I used DomXpath for it but it is not returning a result or nodelist. Here's the code: $DOM = new DOMDocument(); @$DOM->loadHTML($html); ...
more »

2017-05-25 17:05 (2) Answers

create node with multiple attribute

I want to create a node script and set it with multiple attributes This is want I am trying to do: $script_insta_node = $dom->createElement('script'); $script_insta_node->setAttribute('async defer src', $instagram_js_path); The problem is t...
more »

2017-05-24 11:05 (1) Answers

find element in node html

I don't know what I am doing wrong in my code I want to loop all p tag and find image and wrap each with figure tag Here is my html example : $html = <<<EOF <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiu...
more »

2017-05-22 10:05 (2) Answers