To the esteemed readersI'm trying to retrieve data from an xml array of data taken from pubmed. The array looks like this:\[code\]<summa> <DocS> <Id>1</Id> <Item Name="PubDate" Type="Date">1999</Item> <Item Name="EPubDate" Type="Date"/> //<- notice the open tag <Item Name="Source" Type="String">source a</Item> <Item Name="AuthorList" Type="List"> <Item Name="Author" Type="String">a</Item> <Item Name="Author" Type="String">b</Item> </Item> </DocS> <DocS> <Id>2</Id> <Item Name="PubDate" Type="Date">1781</Item> <Item Name="EPubDate" Type="Date"/></Item> //<- notice the closed tag <Item Name="Source" Type="String">source a</Item> <Item Name="AuthorList" Type="List"> <Item Name="Author" Type="String">a</Item> <Item Name="Author" Type="String">b</Item> <Item Name="Author" Type="String">c</Item> <Item Name="Author" Type="String">d</Item> </Item> </DocS></summa>\[/code\]The array is variably long but will always have the initial structure like this :\[code\]<summa> <DocS> <Id>1</Id> <Item Name="PubDate" Type="Date">1999</Item>\[/code\]The data that I specifically need is this\[code\]<Item Name="PubDate" Type="Date">data needed </Item>" \[/code\]The code below is what I'm trying and it doesn't work. Can anybody help me?\[code\]$pmid_all=file_get_contents($url_id);$p=simplexml_load_string($pmid_all);$result = $p->xpath('/item');while(list( , $node) = each($result)) { echo 'item: ',$node,"\n";}\[/code\]