Payne's PHP Notes

Back to Payne's PHP Notebook.

11. Parsing PubMed Data in XML Format

Article's informaint in XML format - Link
Pubmed data element - Link

Expat XML Parser:

Syntax / Example Result
<?php

// Retrieve information in XML format from NIH Pubmed.
$info = file_get_contents("http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=17615129&retmode=xml");

// Create Expat parser.
$parser = xml_parser_create();

// Handler for start tag.
function processStart($parser, $elementName, $elementAttribute)
{
  switch($elementName)
  {
    default:
      echo $elementName . " =<br />";
  }
}

// Handler for end tag.
function processEnd($parser, $elementName)
{
  switch($elementName)
  {
    default:
      echo "<br /><br />";
  }
}

// Handler for char data.
function processChar($parser, $charData)
{
  echo $charData;
}

// Set element handler (start and end tags).
xml_set_element_handler($parser, "processStart", "processEnd");

// Set character data handler.
xml_set_character_data_handler($parser, "processChar");

// Parse XML information.
xml_parse($parser, $info, strlen($inof))
  or die(sprintf("XML error: %s", xml_error_string(xml_get_error_code($parser))));

// Free the parser.
xml_parser_free($parser);

?>
PUBMEDARTICLESET =
PUBMEDARTICLE =
MEDLINECITATION =
PMID =
17615129

DATECOMPLETED =
YEAR =
2008

MONTH =
01

DAY =
07



DATEREVISED =
YEAR =
2016

MONTH =
11

DAY =
24



ARTICLE =
JOURNAL =
ISSN =
0022-3077

JOURNALISSUE =
VOLUME =
98

ISSUE =
3

PUBDATE =
YEAR =
2007

MONTH =
Sep





TITLE =
Journal of neurophysiology

ISOABBREVIATION =
J. Neurophysiol.



ARTICLETITLE =
Voltage imaging reveals the CA1 region at the CA2 border as a focus for epileptiform discharges and long-term potentiation in hippocampal slices.

PAGINATION =
MEDLINEPGN =
1309-22



ABSTRACT =
ABSTRACTTEXT =
Voltage-sensitive-dye imaging was used to study the initiation and propagation of epileptiform activity in transverse hippocampal slices. A portion of the slices tested generated epileptiform discharges in response to electrical shocks under normal physiological conditions. The fraction of slices showing epileptiform responses increased from 44 to 86% when bathing [K+] increased from 3.2 to 4 mM. Regardless of stimulation site in the dentate gyrus and hippocampus, discharges generally initiated in the CA3 region. After onset, discharges abruptly appeared in the CA1 region, right at the CA2 border. This spread from the CA3 region to the CA1 region was saltatory, occurring before detectable activity in the intervening CA2 and CA3 regions. Discharges did eventually propagate smoothly through the intervening CA3 region into the CA2 region, but on a slower timescale. The surge in the CA1 region did not spread back into the CA2 region, but spread through the CA1 region toward the subiculum. Tetanic stimulation, theta bursts, and GABA(A) receptor antagonists failed to alter this characteristic pattern, but did reduce the latency of discharge onset. The part of the CA1 region at the CA2 border, where epileptic responses emerged with relatively short latency, also expressed stronger long-term potentiation (LTP) than the rest of the CA1 region. The CA2 region, where discharges had long latencies and low amplitudes, expressed weaker LTP. Thus the CA1 region at the CA2 border has unique properties, which make this part of the hippocampus an important locus for both epileptiform activity and plasticity.



AUTHORLIST =
AUTHOR =
LASTNAME =
Chang

FORENAME =
Payne Y

INITIALS =
PY

AFFILIATIONINFO =
AFFILIATION =
Department of Physiology and Biophysics Program, University of Wisconsin Medical School, 1300 University Ave., SMI 127, Madison, WI 53706, USA.





AUTHOR =
LASTNAME =
Taylor

FORENAME =
Portia E

INITIALS =
PE



AUTHOR =
LASTNAME =
Jackson

FORENAME =
Meyer B

INITIALS =
MB





LANGUAGE =
eng

GRANTLIST =
GRANT =
GRANTID =
NS-30016

ACRONYM =
NS

AGENCY =
NINDS NIH HHS

COUNTRY =
United States





PUBLICATIONTYPELIST =
PUBLICATIONTYPE =
Journal Article

PUBLICATIONTYPE =
Research Support, N.I.H., Extramural

PUBLICATIONTYPE =
Research Support, Non-U.S. Gov't



ARTICLEDATE =
YEAR =
2007

MONTH =
07

DAY =
05





MEDLINEJOURNALINFO =
COUNTRY =
United States

MEDLINETA =
J Neurophysiol

NLMUNIQUEID =
0375404

ISSNLINKING =
0022-3077



CHEMICALLIST =
CHEMICAL =
REGISTRYNUMBER =
0

NAMEOFSUBSTANCE =
Pyridazines



CHEMICAL =
REGISTRYNUMBER =
99460MG420

NAMEOFSUBSTANCE =
gabazine





CITATIONSUBSET =
IM

MESHHEADINGLIST =
MESHHEADING =
DESCRIPTORNAME =
Animals



MESHHEADING =
DESCRIPTORNAME =
Electric Stimulation



MESHHEADING =
DESCRIPTORNAME =
Epilepsy

QUALIFIERNAME =
physiopathology



MESHHEADING =
DESCRIPTORNAME =
Hippocampus

QUALIFIERNAME =
anatomy & histology

QUALIFIERNAME =
physiology

QUALIFIERNAME =
physiopathology



MESHHEADING =
DESCRIPTORNAME =
In Vitro Techniques



MESHHEADING =
DESCRIPTORNAME =
Kinetics



MESHHEADING =
DESCRIPTORNAME =
Long-Term Potentiation

QUALIFIERNAME =
physiology



MESHHEADING =
DESCRIPTORNAME =
Male



MESHHEADING =
DESCRIPTORNAME =
Models, Neurological



MESHHEADING =
DESCRIPTORNAME =
Neurons

QUALIFIERNAME =
drug effects

QUALIFIERNAME =
physiology



MESHHEADING =
DESCRIPTORNAME =
Pyramidal Cells

QUALIFIERNAME =
physiology



MESHHEADING =
DESCRIPTORNAME =
Pyridazines

QUALIFIERNAME =
pharmacology



MESHHEADING =
DESCRIPTORNAME =
Rats



MESHHEADING =
DESCRIPTORNAME =
Rats, Sprague-Dawley



MESHHEADING =
DESCRIPTORNAME =
Sensory Thresholds







PUBMEDDATA =
HISTORY =
PUBMEDPUBDATE =
YEAR =
2007

MONTH =
7

DAY =
7

HOUR =
9

MINUTE =
0



PUBMEDPUBDATE =
YEAR =
2008

MONTH =
1

DAY =
8

HOUR =
9

MINUTE =
0



PUBMEDPUBDATE =
YEAR =
2007

MONTH =
7

DAY =
7

HOUR =
9

MINUTE =
0





PUBLICATIONSTATUS =
ppublish

ARTICLEIDLIST =
ARTICLEID =
17615129

ARTICLEID =
00532.2007

ARTICLEID =
10.1152/jn.00532.2007










SimpleXML

The structure of requested information

Syntax / ExampleResult
<?php

// Parse information.
$xml = simplexml_load_string($info);

// PMID
$path = '/PubmedArticleSet/PubmedArticle/MedlineCitation/';
$result = $xml->xpath($path . 'PMID');
echo "PMID: <br />" . $result[0] . "<hr />";

// Volume
$path .= 'Article';
$result = $xml->xpath($path . '/Journal/JournalIssue/Volume');
echo "Volume: <br />" . $result[0] . "<hr />";

// Issue
$result = $xml->xpath($path . '/Journal/JournalIssue/Issue');
echo "Issue: <br />" . $result[0] . "<hr />";

// Year
$result = $xml->xpath($path . '/Journal/JournalIssue/PubDate/Year');
echo "Year: <br />" . $result[0] . "<hr />";

// Month
$result = $xml->xpath($path . '/Journal/JournalIssue/PubDate/Month');
echo "Month: <br />" . $result[0] . "<hr />";

// Date
$result = $xml->xpath($path . '/Journal/JournalIssue/PubDate/Date');
echo "Date: <br />" . $result[0] . "<hr />";

// Title
$result = $xml->xpath($path . '/Journal/Title');
echo "Title: <br />" . $result[0] . "<hr />";

// ISOAbbreviation
$result = $xml->xpath($path . '/Journal/ISOAbbreviation');
echo "ISOAbbreviation: <br />" . $result[0] . "<hr />";

// ArticleTitle
$result = $xml->xpath($path . '/ArticleTitle');
echo "ArticleTitle: <br />" . $result[0] . "<hr />";

// MedlinePgn
$result = $xml->xpath($path . '/Pagination/MedlinePgn');
echo "MedlinePgn: <br />" . $result[0] . "<hr />";

// AbstractText
$result = $xml->xpath($path . '/Abstract/AbstractText');
echo "AbstractText: <br />" . $result[0] . "<hr />";

// Affiliation
$result = $xml->xpath($path . '/Affiliation');
echo "Affiliation: <br />" . $result[0] . "<hr />";

// AuthorList
$result = $xml->xpath($path . '/AuthorList');
echo $result[0]->getName() . "<br /><br />";

// Loop through each author
foreach($result[0]->children() as $child)
{
  echo $child->getName() . "<br />";

  // Loop through each child node (LastName, ForeName, Initials)
  foreach($child->children() as $authorChild)
  {
    echo "<b>" . $authorChild->getName() . "</b> : ";
    echo $authorChild . "<br />";
  }

  echo "<br />";
}

?>
PMID:
17615129
Volume:
98
Issue:
3
Year:
2007
Month:
Sep
Date:

Title:
Journal of neurophysiology
ISOAbbreviation:
J. Neurophysiol.
ArticleTitle:
Voltage imaging reveals the CA1 region at the CA2 border as a focus for epileptiform discharges and long-term potentiation in hippocampal slices.
MedlinePgn:
1309-22
AbstractText:
Voltage-sensitive-dye imaging was used to study the initiation and propagation of epileptiform activity in transverse hippocampal slices. A portion of the slices tested generated epileptiform discharges in response to electrical shocks under normal physiological conditions. The fraction of slices showing epileptiform responses increased from 44 to 86% when bathing [K+] increased from 3.2 to 4 mM. Regardless of stimulation site in the dentate gyrus and hippocampus, discharges generally initiated in the CA3 region. After onset, discharges abruptly appeared in the CA1 region, right at the CA2 border. This spread from the CA3 region to the CA1 region was saltatory, occurring before detectable activity in the intervening CA2 and CA3 regions. Discharges did eventually propagate smoothly through the intervening CA3 region into the CA2 region, but on a slower timescale. The surge in the CA1 region did not spread back into the CA2 region, but spread through the CA1 region toward the subiculum. Tetanic stimulation, theta bursts, and GABA(A) receptor antagonists failed to alter this characteristic pattern, but did reduce the latency of discharge onset. The part of the CA1 region at the CA2 border, where epileptic responses emerged with relatively short latency, also expressed stronger long-term potentiation (LTP) than the rest of the CA1 region. The CA2 region, where discharges had long latencies and low amplitudes, expressed weaker LTP. Thus the CA1 region at the CA2 border has unique properties, which make this part of the hippocampus an important locus for both epileptiform activity and plasticity.
Affiliation:

AuthorList

Author
LastName : Chang
ForeName : Payne Y
Initials : PY
AffiliationInfo :

Author
LastName : Taylor
ForeName : Portia E
Initials : PE

Author
LastName : Jackson
ForeName : Meyer B
Initials : MB