awci / phpquery

Automatically exported from code.google.com/p/phpquery
0 stars 0 forks source link

XML file not being parsed #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load attached well-formed XML file
2. Attempt to read/modify using phpQuery

$query = phpQuery::newDocument('enrolment.xml');

print_r('<pre>');
foreach(pq('report ranges range') as $range) {
  print_r(pq($range)->text());
}

print_r($query);

What is the expected output?
TodayThis WeekLast Week(... etc)
(Output of print_ring a phpQuery object)

What do you see instead?
(Output of print_ring an uninitialised phpQuery object)

What version of the product are you using? On what operating system?
0.9.5

Original issue reported on code.google.com by ibnorme...@gmail.com on 18 Nov 2009 at 5:28

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, newDocument reads string markup, use newDocumentFile for files.

- $query = phpQuery::newDocument('enrolment.xml');
+ $query = phpQuery::newDocumentFile('enrolment.xml');

Original comment by tobiasz....@gmail.com on 18 Nov 2009 at 6:54