Questions tagged [zend-dom-query]

Zend\Dom\Query provides mechanisms for querying XML and HTML and XHTML documents utilizing either XPath or CSS selectors.

From the official documentation :

Zend\Dom\Query provides mechanisms for querying XML and HTML and XHTML documents utilizing either XPath or CSS selectors. It was developed to aid with functional testing of MVC applications, but could also be used for rapid development of screen scrapers.

CSS selector notation is provided as a simpler and more familiar notation for web developers to utilize when querying documents with XML structures. The notation should be familiar to anybody who has developed Cascading Style Sheets or who utilizes Javascript toolkits that provide functionality for selecting nodes utilizing CSS selectors .

25 questions
0
votes
2 answers

How to retrieve exact html element from Zend\Dom\Query object

I want to use Zend\Dom to get all html elements in a div , but it just extracts the it's text and strips html tags HTML :
Text1
Text2
I want to get this :
Dante
  • 101
  • 12
0
votes
1 answer

jQuery( "[attribute^='value']" ) in xpath zend_dom_query

How to select all nodes with rel atrribute starting with "placeholder_"? In jQuery I achieve it by ( "[rel^='placeholder_']" ) but carrot is not working when I use $domObj=new Zend_Dom_Query(); $domObj->setDocument($templateRender); …
0
votes
1 answer

Zend_Dom_Query to check schema.org markup

I want to check if a website contains schema.org markup? I am doing the following: $domain = 'http://agents.allstate.com/william-leahy-mount-prospect-il.html'; $client = new Zend_Http_Client(); $client->setUri($domain); …
VishwaKumar
  • 3,433
  • 8
  • 44
  • 72
0
votes
2 answers

Too slow Http Client in Zend Framework 1.12

I want to send ~50 requests to different pages on the same domain and then, I'm using DOM object to gain urls to articles. The problem is that this number of requests takes over 30 sec. for ($i = 1; $i < 51; $i++) { $url =…
0
votes
1 answer

Zend_Dom_Query multiple selects

I'm trying to use Zend_Dom_Query to get some specific content from a webpage. I got a query working to get the content from one dom-element. Now i want to select a second dom-element to get this content also. This is the html:
0
votes
1 answer

Can I use Zend Dom Query to query other html attributes such as ALT

Using Zend Dom Query I would like to search HTML to find certain attributes. Take the following image as an example. Image 1234 Instead of using…
David Sigley
  • 1,126
  • 2
  • 13
  • 28
0
votes
2 answers

Zend_Dom_Query how to get html code of current node

I have nodes, and iterate them in loop. $html = << 1 2
HTML; $dom= new Zend_Dom_Query($html); $results = $dom->query('span'); foreach($results as $node){ ... } How get html code…
Andrey Vorobyev
  • 896
  • 1
  • 10
  • 37
0
votes
1 answer

Zend_Dom_Query selector for second element

Don't select me Select me
I want to select second span in div#test. Exist eq() selector (like jQuery) or something like that?
Andrey Vorobyev
  • 896
  • 1
  • 10
  • 37
0
votes
1 answer

Zend_Dom_Query getting array

I'm trying to scrape html code from websites in associative array. I tried it with Zend_Dom_Query. Example:
-1
votes
1 answer

Digging deeper into DOMElement

I've used Zend_Dom_Query to extract some elements and I want to now loop through them and do some more. Each looks like this, so how can I print the title Title 1 and the id of the second td id=categ-113?
sameold
  • 18,400
  • 21
  • 63
  • 87
1
2