Dom XML get_element_by_tag_name() question
Posted: Sat Jul 08, 2006 5:35 am
Hello there, just wondering if anyone can tell me whether when you copy <item> elements from and RSS feed using something like this:
Does this copy the whole tree so you can then do this:
or is that incorrect and what I need to do is generate a new xml doc tree with the various <item>s?
It doesn't seem to work as I've got it above but I could be doing something else daft.
Any help would be much appreciated.
B
Code: Select all
$doc = domxml_new_doc("1.0");
$doc = domxml_open_file('http://news.google.co.uk/nwshp?hl=en&tab=wn&q=&output=rss');
$item_array = $doc->get_elements_by_tagname("item");Code: Select all
$title_array = $item_array->get_elements_by_tagname("title");It doesn't seem to work as I've got it above but I could be doing something else daft.
Any help would be much appreciated.
B