nlmmedline_xml_format.py
A Martel format to parse the NLM's XML format for Medline.
http://www.nlm.nih.gov/databases/dtd/nlmmedline_010319.dtd
http://www.nlm.nih.gov/databases/dtd/nlmmedlinecitation_010319.dtd
http://www.nlm.nih.gov/databases/dtd/nlmcommon_010319.dtd
Formats:
citation_format Format for one MedlineCitation.
format Format for a whole file.
Imported modules
|
|
from Martel import *, RecordReader
import sys
|
Functions
|
|
_end_elem
_start_elem
group_elem
simple_elem
|
|
_end_elem
|
_end_elem ( element )
|
|
_start_elem
|
_start_elem ( element, *attrs )
|
|
group_elem
|
group_elem (
element,
expr,
*attrs,
)
Group expressions. A group consists of the start and end elements
with an expression in-between. The Expression for the group will be
called "NAME".
|
|
simple_elem
|
simple_elem ( element, *attrs )
simple_elem(element, *attrs)
Create a Martel Expression in this module's namespace that will
recognize an XML element in the form of:
<element>data</element>
The whole element must be on a single line. The Expression will
be created in the module's namespace with the same name as the
element.
|
|