Reputation: 477
I have one xml file, which is 16.4MB in size. I need to select and print only the programme
nodes that have a channel attribute value of:
BHT 1
here is xml file url: http://epg.com/epg.xml
Upvotes: 0
Views: 241
Reputation: 1541
Would something like this work?
$epgdoc = new DOMDocument();
// put the acutal path to your document here
$epgdoc->load('epg.xml');
$xpathvar = new Domxpath($epgdoc);
$queryResult = $xpathvar->query("//channel[@id='BHT 1']");
foreach($queryResult as $result){
echo $result->textContent;
}
I think if you play around with that you can get what you need.
Upvotes: 1