nih-gov/www.nlm.nih.gov/mesh/xmlmesh.html
2025-02-26 13:17:41 -05:00

486 lines
34 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" title="The Dublin Core metadata Element Set" />
<link rel="stylesheet" href="/home_assets/uswds/css/styles.css">
<link rel="stylesheet" type="text/css" href="/mesh/styles/mesh.css" title="default" />
<title>Introduction to MeSH in XML Format</title>
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" title="The Dublin Core metadata Element Set" />
<meta name="DC.Title" content="Introduction to MeSH in XML Format" />
<meta name="DC.Publisher" content="U.S. National Library of Medicine" />
<meta name="DC.Date.Issued" content="2014-08-19" />
<meta name="DC.Date.Modified" content="2023-03-27" />
<meta name="NLMDC.Date.LastReviewed" content="2022-07-11" />
<meta name="NLM.Contact.Email" content="NLMUSCDHDSCVSMeSHWeb@mail.nih.gov" />
<meta name="DC.Type" content="Technical Documentation" />
<meta name="NLM.Permanence.Level" content="Permanent: Dynamic Content" />
<meta name="DC.Rights" content="Public Domain" />
<meta name="DC.Language" content="eng" />
<!-- Google Tag Manager --><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push(
{'gtm.start': new Date().getTime(),event:'gtm.js'}
);var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-MT6MLL');</script>
<!-- End Google Tag Manager -->
</head>
<body>
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-MT6MLL" height="0" width="0" style="display:none;visibility:hidden" title="googletagmanager"></iframe></noscript>
<!-- End Google Tag Manager -->
<!-- TOP NAV -->
<a class="usa-skipnav" href="#main">Skip to main content</a>
<div class="usa-banner site-banner" aria-label="Official government website">
<div class="usa-accordion">
<header class="usa-banner__header">
<div class="usa-banner__inner">
<div class="grid-col-auto"> <img class="usa-banner__header-flag" src="https://assets.nlm.nih.gov/uswds/img/us_flag_small.png" alt="U.S. flag"/> </div>
<div class="grid-col-fill tablet:grid-col-auto">
<p class="usa-banner__header-text"> An official website of the United States government </p>
<p class="usa-banner__header-action" aria-hidden="true"> Heres how you know </p>
</div>
<button class="usa-accordion__button usa-banner__button" aria-expanded="false" aria-controls="gov-banner"> <span class="usa-banner__button-text">Heres how you know</span> </button>
</div>
</header>
<div class="usa-banner__content usa-accordion__content" id="gov-banner">
<div class="grid-row grid-gap-lg">
<div class="usa-banner__guidance tablet:grid-col-6"> <img class="usa-banner__icon usa-media-block__img" src="https://assets.nlm.nih.gov/uswds/img/icon-dot-gov.svg" role="img" alt="" aria-hidden="true"/>
<div class="usa-media-block__body">
<p> <strong> Official websites use .gov </strong> <br />
A <strong>.gov</strong> website belongs to an official government
organization in the United States. </p>
</div>
</div>
<div class="usa-banner__guidance tablet:grid-col-6"> <img class="usa-banner__icon usa-media-block__img" src="https://assets.nlm.nih.gov/uswds/img/icon-https.svg" role="img" alt="" aria-hidden="true"/>
<div class="usa-media-block__body">
<p> <strong> Secure .gov websites use HTTPS </strong> <br />
A <strong>lock</strong> ( <span class="icon-lock">
<svg xmlns="http://www.w3.org/2000/svg" width="52" height="64" viewBox="0 0 52 64" class="usa-banner__lock-image" role="img" aria-labelledby="banner-lock-title-default banner-lock-description-default" focusable="false">
<title id="banner-lock-title-default">Lock</title>
<desc id="banner-lock-description-default">A locked padlock</desc>
<path fill="#000000" fill-rule="evenodd" d="M26 0c10.493 0 19 8.507 19 19v9h3a4 4 0 0 1 4 4v28a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V32a4 4 0 0 1 4-4h3v-9C7 8.507 15.507 0 26 0zm0 8c-5.979 0-10.843 4.77-10.996 10.712L15 19v9h22v-9c0-6.075-4.925-11-11-11z"/>
</svg>
</span> ) or <strong>https://</strong> means youve safely connected to the .gov website. Share sensitive information only on official, secure websites. </p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- HEADER -->
<header id="siteheader" class="usa-header usa-header--basic">
<div class="usa-nav-container tablet:padding-x-4 mobile-lg:padding-x-2 padding-y-1">
<div class="grid-row padding-y-105">
<div class="grid-col-8 desktop:grid-col-4 tablet-lg:grid-col-4 tablet:grid-col-6"> <a href="https://www.nlm.nih.gov/"> <img src="https://assets.nlm.nih.gov/uswds/img/NLM_White.png" alt="NLM logo" class="logo margin-top-1"> </a> </div>
<div class="desktop:grid-col-4 desktop:grid-offset-4 tablet-lg:grid-col-6 tablet-lg:grid-offset-2 tablet:grid-col-6 grid-col-12">
<form class="usa-search desktop:margin-top-2 tablet:margin-top-2 mobile:margin-top-1" role="search" data-gtm-form-interact-id="0" method="get" action="//vsearch.nlm.nih.gov/vivisimo/cgi-bin/query-meta" target="_self" name="searchForm" id="searchForm2">
<input class="usa-input ui-autocomplete-input" aria-label="Search" type="search" name="query" data-gtm-form-interact-field-id="0" id="search2" autocomplete="off" placeholder="Search NLM" >
<input type="hidden" name="v:project" value="nlm-main-website">
<button class="usa-button border border-top border-bottom border-right border-white" role="button" aria-label="Search" type="submit"> <span class="usa-search__submit-text"> <i class="fas fa-search"></i> </span> </button>
</form>
</div>
</div>
</div>
</header>
<div class="bg-secondary insertCOOP">
<div class="usa-nav-container">
<div class="usa-navbar ">
<button class="usa-menu-btn">Menu</button>
</div>
<nav aria-label="Primary navigation" class="usa-nav">
<button class="usa-nav__close"><img src="https://assets.nlm.nih.gov/uswds/img/close.svg" alt="close"></button>
<ul class="usa-nav__primary usa-accordion insertNav">
<li class="usa-nav__primary-item desktop-lg:margin-x-5 desktop:margin-x-3 tablet:margin-x-0">
<button type="button" class="usa-accordion__button usa-nav__link usa-current" aria-expanded="false" aria-controls="basic-nav-section-one"> <span>Products and Services <i class="fas fa-caret-down margin-left-05"></i> </span> </button>
<ul id="basic-nav-section-one" class="usa-nav__submenu bg-secondary" hidden="">
<li class="usa-nav__submenu-item"> <a href="//eresources.nlm.nih.gov/nlm_eresources/"><span>All Products and Services</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//clinicaltrials.gov/"><span>ClinicalTrials.gov</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//collections.nlm.nih.gov/"><span>Digital Collections</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//catalog.nlm.nih.gov"><span>LocatorPlus Catalog</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//meshb.nlm.nih.gov/search"><span>Medical Subject Headings (MeSH)</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//medlineplus.gov/"><span>MedlinePlus</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//pubmed.ncbi.nlm.nih.gov/"><span>PubMed/MEDLINE</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//uts.nlm.nih.gov/uts/"><span>Unified Medical Language System (UMLS)</span></a> </li>
</ul>
</li>
<li class="usa-nav__primary-item desktop-lg:margin-x-5 desktop:margin-x-3 tablet:margin-x-0">
<button type="button" class="usa-accordion__button usa-nav__link usa-current" aria-expanded="false" aria-controls="basic-nav-section-two"> <span> Resources for You <i class="fas fa-caret-down margin-left-05"></i></span> </button>
<ul id="basic-nav-section-two" class="usa-nav__submenu bg-secondary" hidden="">
<li class="usa-nav__submenu-item"> <a href="/portals/researchers.html"><span>For Researchers</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/portals/publishers.html "><span>For Publishers</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/portals/librarians.html"><span>For Librarians</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/training.html "><span>For Educators/Trainers </span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/portals/healthcare.html"><span>For Health care Professionals</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/portals/public.html "><span>For the Public</span></a> </li>
</ul>
</li>
<li class="usa-nav__primary-item desktop-lg:margin-x-5 desktop:margin-x-3 tablet:margin-x-0">
<button type="button" class="usa-accordion__button usa-nav__link usa-current" aria-expanded="false" aria-controls="basic-nav-section-three"> <span>Explore NLM <i class="fas fa-caret-down margin-left-05"></i> </span> </button>
<ul id="basic-nav-section-three" class="usa-nav__submenu bg-secondary" hidden="">
<li class="usa-nav__submenu-item"> <a href="/about/index.html"><span>About the Library</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/about/visitor.html"><span>Visit the Library</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/hmd/index.html"><span>History of Medicine</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/about/org.html"><span>NLM by Organization</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/news/newsandevents.html"><span>News, Events, and Updates</span></a> </li>
</ul>
</li>
<li class="usa-nav__primary-item desktop-lg:margin-x-5 desktop:margin-x-3 tablet:margin-x-0">
<button type="button" class="usa-accordion__button usa-nav__link usa-current" aria-expanded="false" aria-controls="basic-nav-section-four"> <span> Grants and Research <i class="fas fa-caret-down margin-left-05"></i> </span> </button>
<ul id="basic-nav-section-four" class="usa-nav__submenu bg-secondary" hidden="">
<li class="usa-nav__submenu-item"> <a href="/ep/index.html"><span>NLM Extramural Programs</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="/research/index.html"><span>NLM Intramural Research Program</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="https://www.ncbi.nlm.nih.gov/"><span>National Center for Biotechnology Information</span></a> </li>
<li class="usa-nav__submenu-item"> <a href="//lhncbc.nlm.nih.gov/"><span>Lister Hill National Center for Biomedical Communications</span></a> </li>
</ul>
</li>
</ul>
</nav>
</div>
</div>
<!-- End of TOP NAV -->
<!-- DIVISIONAL BANNER -->
<div class="bg-gray-70">
<div class="grid-container">
<div class="grid-row divisional">
<a href=""><img src="/images/meshhead.gif" class="float-left margin-top-2 margin-right-2" alt="MeSH logo"></a>
<div class="grid-col text-white">
<div class="float-left">
<h4 class="margin-bottom-0">Medical Subject Headings</h4>
</div>
<div class="float-right margin-top-05">
<p>
<a class="text-white" href="/mesh/">MeSH Home</a>
&nbsp;&nbsp;|&nbsp;&nbsp;<a class="text-white" href="https://www.nlm.nih.gov/bsd/disted/mesh.html">Learn About MeSH</a>
&nbsp;&nbsp;|&nbsp;&nbsp;<a class="text-white" href="https://meshb.nlm.nih.gov/">MeSH Browser</a>
&nbsp;&nbsp;|&nbsp;&nbsp;<a class="text-white" href="/databases/download/mesh.html">Download MeSH Data</a>
&nbsp;&nbsp;|&nbsp;&nbsp;<a class="text-white" href="https://meshb.nlm.nih.gov/MeSHonDemand">MeSH on Demand</a>
&nbsp;&nbsp;|&nbsp;&nbsp;<a class="text-white" href="/mesh/meshsugg.html">Suggestions</a>
</p>
</div>
</div>
</div>
</div>
</div>
<!--END DIVISIONAL BANNER -->
<!-- Breadcrumbs -->
<div class="grid-container">
<nav class="usa-breadcrumb usa-breadcrumb--wrap padding-top-1" aria-label="Breadcrumbs">
<ol class="usa-breadcrumb__list">
<li class="usa-breadcrumb__list-item"> <a href="/index.html" class="usa-breadcrumb__link"><span>Home</span></a> </li>
</ol>
</nav>
</div>
<!-- End Breadcrumbs -->
<main class="padding-bottom-5" id="main">
<div class="grid-container">
<!-- ************************* MeSH Content start ************************* -->
<div id="mesh">
<h1 style="text-align: center;">Introduction to MeSH in XML Format</h1>
<h3>1. Background</h3>
<p>The National Library of Medicine has adopted the Extensible Markup Language (XML) as a standard format for its data files. The MeSH (Medical Subject Headings) vocabulary file is available in an XML format that is similar to the format and DTD developed for MEDLINE. (See <a href="//www.nlm.nih.gov/bsd/licensee/medpmmenu.html">MEDLINE&reg;/PubMed&reg; Data</a>.) This format will be of particular interest to those who previously received MeSH data in the NLM ELHILL format and of interest to PubMed and UMLS&reg; developers. ASCII MeSH users and new users of MeSH data may also wish to consider use of vocabulary data in the XML format.</p>
<p>Some data are new in XML MeSH, particularly those elements* pertaining to concepts. While this adds to the number of elements, the concept element provides a powerful way of representing term synonymy as well as other information, such as relations between concepts. It should also be noted that there is a reduction in the number of elements in previous formats. For example, the former elements MH, NM, SY, BX, SH, and QX are all different kinds of terms and so are all represented by the term and string elements in XML MeSH. <!-- full path /mesh/2014/download; two links -->A <a href="/mesh/xml_data_elements.html">list of XML data elements</a> is available. A <a href="/mesh/xmlconvert.html">conversion table</a> is also available which lists ASCII MeSH and ELHILL MeSH elements with the corresponding element in XML MeSH.</p>
<p>* Note that this document often refers to 'element' as generic term for database field content. In XML 'element' is a technical term denoting the primary components designated by beginning and end tags See next numbered item, below.</p>
<h3>2. Tagged elements: "human-legible and reasonably clear."</h3>
<p>Instead of short mnemonics, such as 'DA' and 'EV', XML MeSH uses XML beginning and end tags, for example, &lt;DateCreated&gt; and &lt;EntryVersion&gt;. These data markers unambiguously indicate the beginning and ending of each data element instead of relying on invisible end-of-line characters. This allows data to wrap to the next line within an element, making it easier for a human (vs. a computer) to read an XML document. The possibility of wrapping data also allows tags to be more descriptive, since there is no longer a great need for minimizing the length of tags. This contributes to the goal of the official XML specification that "XML documents should be human-legible and reasonably clear." <sup>1</sup> One cost of this advantage is that data files are much larger than in the past but, as the XML specification also says, "Terseness in XML markup is of minimal importance." <sup>2</sup></p>
<h3>3. Concepts, synonyms, and Descriptor structure</h3>
<p><strong>3.1 Concepts locate synonymy.</strong></p>
<p>Some data elements are new in XML MeSH, independently of the new structure, primarily those elements pertaining to concepts. The concept-centric nature of MeSH is described elsewhere. <sup>3</sup> A concept is the common meaning shared by synonymous terms. MeSH and other vocabularies have long used concepts implicitly. With the new MeSH maintenance system introduced with 2000 MeSH, a concept can now be represented simply and precisely by a concept Unique Identifier (&lt;ConceptUI&gt;). Synonymous terms are those terms which share the same &lt;ConceptUI&gt;.</p>
<p><strong>3.2 Descriptors as a class of Concepts</strong></p>
<p>A Descriptor is often broader than a single concept and so may consist of a class of concepts. Concepts, in turn, correspond to a class of terms which are synonymous with each other. Thus MeSH has a three-level structure:</p>
<pre> Descriptor
Concept
Term</pre>
<p>XML format, with its hierarchical sub-element structure, lends itself to represent these levels. See example below.</p>
<p><strong>3.3 UIs are persistent names for Concepts and other objects</strong></p>
<p>We normally refer to each of these objects by a specific term which names the object, e.g., 'Heart', but since this name can be changed, a unchanging numeric code (UI) is assigned to each Descriptor, Concept, and most Terms.* We take advantage of this persistence, using the UI in referring to an object in another record. For example, the "See Related" reference in a record tells the user to consider another Descriptor record. Since the UI is the persistent name of the Descriptor in the SeeRelated element, the UI is included but the Descriptor name is also included.</p>
<p>* Permuted Terms (terms automatically generated by manually entered terms) are on the same level as manually created terms but are importantly different in that the associated &lt;TermUI&gt; element does not identify the term but rather refers to the term from which the Permuted Term was generated.</p>
<p><strong>3.4 Data elements attach to the appropriate object</strong></p>
<p>The Descriptor/Concept/Term structure also makes it possible to attach various data elements in MeSH to the appropriate object. For example, the Scope Note belongs to the concept rather than the Descriptor - a Descriptor may have several different concepts and so several different scope notes. Similarly, thesauri have long distinguished between "broader terms" and "narrower" terms, but it is clear that these are relations between concepts and only derivatively between terms of the respective concepts. The Unified Medical Language System (UMLS) Metathesaurus&reg; has a similar structure, and this has had a significant influence on the design of XML MeSH.</p>
<h3>4. An example</h3>
<p>One of the most noticeable differences between previous MeSH data structures and XML MeSH is the several levels of XML elements. (The indented sub-element structure in any XML files can be viewed by using an XML browser, such as Internet Explorer 5.x.) This hierarchical structure is inherent in the XML but lends itself to the concept-oriented structure in MeSH and replaces the sub-element structure. Consider, for example, this fragment of an XML Descriptor record:</p>
<pre>&lt;DescriptorRecord ...&gt;&lt;!-- Descriptor --&gt;
&lt;DescriptorUI&gt;D000005&lt;/DescriptorUI&gt;
&lt;DescriptorName&gt;&lt;String&gt;Abdomen&lt;/String&gt;&lt;/DescriptorName&gt;
&lt;Annotation&gt; region &amp; abdominal organs...
&lt;/Annotation&gt;
&lt;ConceptList&gt;
&lt;Concept PreferredConceptYN="Y"&gt;&lt;!-- Concept --&gt;
&lt;ConceptUI&gt;M0000005&lt;/ConceptUI&gt;
&lt;ConceptName&gt;&lt;String&gt;Abdomen&lt;/String&gt;&lt;/ConceptName&gt;
&lt;ScopeNote&gt; That portion of the body that lies
between the thorax and the pelvis.&lt;/ScopeNote&gt;
&lt;TermList&gt;
&lt;Term ... PrintFlagYN="Y" ... &gt;&lt;!-- Term --&gt;
&lt;TermUI&gt;T000012&lt;/TermUI&gt;
&lt;String&gt;Abdomen&lt;/String&gt;&lt;!-- String = the term itself --&gt;
&lt;DateCreated&gt;
&lt;Year&gt;1999&lt;/Year&gt;
&lt;Month&gt;01&lt;/Month&gt;
&lt;Day&gt;01&lt;/Day&gt;
&lt;/DateCreated&gt;
&lt;/Term&gt;
&lt;Term IsPermutedTermYN="Y" LexicalTag="NON"&gt;
&lt;TermUI&gt;T000012&lt;/TermUI&gt;
&lt;String&gt;Abdomens&lt;/String&gt;
&lt;/Term&gt;
&lt;/TermList&gt;
&lt;/Concept&gt;
&lt;/ConceptList&gt;
&lt;/DescriptorRecord&gt;
</pre>
<p>The corresponding data in ELHILL format are:</p>
<pre>UI - D000005
MH - Abdomen
AN - region &amp; abdominal organs ...
BX - Abdomens:0:00000000:0000000:@@@@@@
MS - That portion of the body that lies between the thorax and the pelvis.
</pre>
<p>The XML example illustrates the following features.</p>
<p><strong>4.1 Descriptor structure</strong></p>
<p>The descending order of the Descriptor/Concept/Term objects corresponds to the Descriptor structure.</p>
<p><strong>4.1.1 The &lt;String&gt; element</strong></p>
<p>In addition to the &lt;Term&gt; element there is also a &lt;String&gt; element. Why both? Why not make the term itself the content of the Term element, e.g.,</p>
<p>&lt;Term&gt;Heart&lt;/Term&gt;</p>
<p>One reason is a technical XML reason. The element &lt;Term&gt; has sub- elements and the practice of including both element content as well as sub-elements is considered "mixed content" and is generally considered a "poor design practice" <sup>4</sup> in XML. Another reason, specific to MeSH, is that the &lt;String&gt; element is useful in the definition of the heavily used element &lt;DescriptorName&gt;. Using &lt;String&gt; in the definition is not strictly necessary - #PCDATA could have been used, but using the same sub-element for &lt;Term&gt; as for several other elements (&lt;DescriptorName&gt;, &lt;ConceptName&gt;,&lt;SupplementalRecordName&gt;, &lt;QualifierName&gt;,&lt;SupplementalRecordName&gt;) indicates that both elements have the same content, which is in fact the case.</p>
<p>Note that the &lt;String&gt; and &lt;Term&gt; elements are not exactly the same as the similarly named elements in the UMLS Metathesaurus. In XML MeSH there is one &lt;Term&gt; element for each term-string in the database, while in the UMLS Metathesaurus there can be multiple strings corresponding to a given term. Thus, the XML MeSH &lt;Term&gt; element is more like the UMLS string element. There is no XML MeSH element that directly corresponds to the UMLS Term data element. The MeSH &lt;String&gt; element is similar to the UMLS String but note that the element used in XML MeSH is used for reasons specific to XML, as noted above, not because it is a narrower type of object than the &lt;Term&gt; element.</p>
<p><strong>4.1.2 Inheritance</strong></p>
<p>As a general rule in the MeSH Descriptor structure, each child element inherits the properties of its parent and higher objects. This rule is nicely represented by the XML element hierarchy but there is nothing in the XML specification that requires inheritance. (In the language of computer science, the hierarchy is a "directed graph", which could just as well represent a flow-chart or maze diagram.)</p>
<p><strong>4.2 Data Elements</strong></p>
<p>Data elements are attached to the appropriate object For example, the &lt;Annotation&gt; element is a Descriptor property so it is a sub-element of the &lt;DescriptorRecord&gt; element. The Scope Note belongs with the concept and so it is a sub-element of the &lt;Concept&gt;</p>
<p><strong>4.3 Repeating elements representing by list elements</strong></p>
<p>Sub-elements are created not only by the MeSH Descriptor structure, but also by the use of "List" elements, for example, &lt;TermList&gt;. This is NLM's practice for handling multiply-occurring data elements. While additional levels are introduced, it has the advantage that every element at a given level is unique, which makes it simpler for both computer parsers as well as human readers to navigate the hierarchy. For example, in processing Descriptor sub-elements, you can be sure you have all the subordinate Concept elements once you have located the &lt;ConceptList&gt; tag.</p>
<p><strong>4.4 XML attributes</strong></p>
<p>There are properties which are not XML elements but appear within an element, for example, Term ... PrintFlagYN="Y". These are XML "attributes" and apply to the element with which they appear. These could have been elements instead but one advantage of attributes in these cases is that we can specify all possible values. This provides the user with additional information so the XML attribute representation was adopted where all possible values could be reasonably specified.</p>
<p><strong>4.5 Reference to other records</strong></p>
<p>As in the past, several MeSH data elements refer to other records, for example, the 'See Related' and 'Heading Mapped-To'. Since the UI (Unique Identifier) is the name of the record which never changes, these references employ the UI. In addition, since the familiar name of the record is the current preferred term for the preferred concept in the record, the name is included as well. For example in the Descriptor for 'Abnormalities, Drug-Induced' there is a "See Related" reference to 'Teratogens'. In XML this is represented by the following.</p>
<pre>&lt;SeeRelatedDescriptor&gt;
&lt;DescriptorReferredTo&gt;
&lt;DescriptorUI&gt;D013723&lt;/DescriptorUI&gt;
&lt;DescriptorName&gt;
&lt;String&gt;Teratogens&lt;/String&gt;
&lt;/DescriptorName&gt;
&lt;/DescriptorReferredTo&gt;
&lt;/SeeRelatedDescriptor&gt;
</pre>
<p>The element &lt;SeeRelatedDescriptor&gt; is needed in order to group each pair of &lt;DescriptorUI&gt; and &lt;DescriptorName&gt; elements. The element &lt;DescriptorReferredTo&gt; is not strictly necessary for grouping but is used in elements which refer to both a Descriptor and Qualifier to separate the two references, for example:</p>
<pre>&lt;HeadingMappedTo&gt;
&lt;DescriptorReferredTo&gt;
&lt;DescriptorUI&gt;D000117&lt;/DescriptorUI&gt;
&lt;DescriptorName&gt;
&lt;String&gt;Acetylglucosamine&lt;/String&gt;
&lt;/DescriptorName&gt;
&lt;/DescriptorReferredTo&gt;
&lt;QualifierReferredTo&gt;
&lt;QualifierUI&gt;*Q000031&lt;/QualifierUI&gt;
&lt;QualifierName&gt;
&lt;String&gt;analogs &amp;amp; derivatives&lt;/String&gt;
&lt;/QualifierName&gt;
&lt;/QualifierReferredTo&gt;
&lt;/HeadingMappedTo&gt;
</pre>
<p>An XML processor does not need &lt;DescriptorReferredTo&gt; to distinguish &lt;DescriptorUI&gt; from &lt;QualifierUI&gt;, even if they were not contiguous with the &lt;DescriptorName&gt; and &lt;QualifierName&gt;. Nevertheless, the division clearly distinguishes the Descriptor from the Qualifier portion. This applies not only to the &lt;HeadingMappedTo&gt; element but also to the &lt;EntryCombination&gt; since reference is also to both a Descriptor and Qualifier. The same rationale for &lt;DescriptorReferredTo&gt; does not apply to elements which refer to just Descriptors, such as the &lt;SeeRelatedDescriptor&gt;, and &lt;PharmacologicalAction&gt; elements, but the element is included for them as well for the sake of consistency.</p>
<p>In the XML specification the attribute type IDREF (along with the type ID) provides a similar function of referring to another unique identifier elsewhere in the database. <sup>5</sup> XML MeSH does not use this mechanism primarily to provide data which is similar to previous formats.</p>
<h3>5. Unification of elements across record types</h3>
<p>While XML MeSH includes more data elements than previous formats, the XML MeSH structure actually eliminates some elements, or unifies them in common elements. For example, the MH, NM, SY, BX, SH, and QX are all different kinds of terms and so are all represented by the &lt;term&gt; and &lt;string&gt; elements in XML MeSH.</p>
<h3>6. Special characters</h3>
<p><strong>6.1 XML characters</strong></p>
<p>Some MeSH data contain the ampersand ('&amp;') and corner brackets ('&gt;' and '&lt;' ), which are data in MeSH but which XML processors treat as special symbols rather than as data. Therefore these symbols are represented by XML character entities:</p>
<table class="usa-table">
<tbody>
<tr>
<th>name</th>
<th>character</th>
<th>code</th>
</tr>
<tr>
<td>ampersand</td>
<td>&amp;</td>
<td>&amp;amp;</td>
</tr>
<tr>
<td>left angle bracket</td>
<td>&lt;</td>
<td>&amp;lt;</td>
</tr>
<tr>
<td>right angle bracket</td>
<td>&gt;</td>
<td>&amp;gt;</td>
</tr>
</tbody>
</table>
<p><strong>6.2 Non-ASCII characters</strong></p>
<p>Data in XML MeSH files are encoded in the Unicode character set, specifically UTF-8. However, most of the data are in 7-bit ASCII format, a subset of UTF-8. A relatively small number of terms and Annotations contain one or more diacritical characters, such as the acute e (&eacute;). These are coded in UTF-8 format and will be correctly displayed by UTF-8 applications. Otherwise they may appear differently in different displays. Codings for diacritics in NLM data can be found in the table <a href="//www.nlm.nih.gov/databases/dtd/medline_characters.html">MEDLINE Character Database</a>.</p>
<h4>Notes</h4>
<p><sup>1</sup> Item 1.1.6 in version 1.0 of XML. See. DuCharme B. <em>XML: The Annotated Specification</em>. New Jersey: Prentice-Hall, 1999, p. 52. Specification is also at: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a>. Viewed Oct. 5, 2004.</p>
<p><sup>2</sup> Item 1.1.10. <em>Ibid.</em></p>
<p><sup>3</sup> For further discussion of MeSH as concept-centered, see Johnston WD et al., "Redefining a Thesaurus: Term-Centric No More." Poster presentation at: AMIA 1998 Annual Symp.; 1998 Nov 10; Orlando FL.</p>
<p><sup>4</sup> Dick K <em>XML: A Manager's Guide</em>. (Reading, Mass: Addison-Wesley, 1999) p. 29.</p>
<p><sup>5</sup> See Item 3.3.1 (Attribute Types) in the XML specification in note 1.</p>
</div>
<!-- ************************* MeSH Content End ************************* -->
<p class=”margin-top-5”><small>Last Reviewed: July 11, 2022</small></p>
</div>
</main>
<!-- FOOTER -->
<footer class="usa-footer__primary-section padding-top-5 padding-bottom-3 insertfooter">
<div class="grid-container">
<div class="grid-row">
<div class="desktop:grid-col-3 grid-col-6"> <a href="https://www.nlm.nih.gov/socialmedia/index.html">
<p class="text-white margin-bottom-1">Connect with NLM</p>
</a>
<ul class="social_media add-list-reset">
<li class="margin-right-05"><a href="https://www.facebook.com/nationallibraryofmedicine"><img class="bg-secondary" src="https://www.nlm.nih.gov/images/facebook.svg" alt="Facebook"></a></li>
<li class="margin-right-05"><a title="External link: please review our privacy policy." href="https://www.linkedin.com/company/national-library-of-medicine-nlm/"><img class="bg-secondary" src="//www.nlm.nih.gov/images/linkedin.svg" alt="LinkedIn"></a></li>
<li class="margin-right-05"><a title="External link: please review our privacy policy." href="https://twitter.com/NLM_NIH"><img src="https://www.nlm.nih.gov/images/twitter.svg" class="padding-1 bg-secondary" alt="Twitter"></a></li>
<li class="margin-right-05"><a title="External link: please review our privacy policy." href="https://www.youtube.com/user/NLMNIH"><img src="//www.nlm.nih.gov/images/youtube.svg" class="bg-secondary" alt="You Tube"></a></li>
<li class="margin-right-05"><a title="External link: please review our privacy policy." href="https://public.govdelivery.com/accounts/USNLMOCPL/subscriber/new?preferences=true"><img src="//www.nlm.nih.gov/images/mail.svg" class=" bg-secondary" alt="Government Delivery"></a></li>
</ul>
</div>
<div class="desktop:grid-col-3 grid-col-6">
<p class="address_footer text-white"> National Library of Medicine <br>
<a href="https://www.google.com/maps/place/8600+Rockville+Pike,+Bethesda,+MD+20894/@38.9959508,-77.101021,17z/data=!3m1!4b1!4m5!3m4!1s0x89b7c95e25765ddb:0x19156f88b27635b8!8m2!3d38.9959508!4d-77.0988323" class="text-white"> 8600 Rockville Pike <br>
Bethesda, MD 20894 </a></p>
</div>
<div class="desktop:grid-col-3 grid-col-6">
<p><a href="/web_policies.html" class="text-white"> Web Policies </a><br>
<a href="https://www.nih.gov/institutes-nih/nih-office-director/office-communications-public-liaison/freedom-information-act-office" class="text-white"> FOIA </a><br>
<a href="https://www.hhs.gov/vulnerability-disclosure-policy/index.html" class="text-white">HHS Vulnerability Disclosure</a> </p>
</div>
<div class="desktop:grid-col-3 grid-col-6">
<p><a class="supportLink text-white" href="//support.nlm.nih.gov?from="> NLM Support Center </a> <br>
<a href="/accessibility.html" class="text-white"> Accessibility </a><br>
<a href="/careers/careers.html" class="text-white"> Careers </a></p>
</div>
</div>
<div class="grid-row">
<div class="grid-col-12">
<p class="text-center text-white"> <a class="text-white" href="//www.nlm.nih.gov/">NLM</a> | <a class="text-white" href="https://www.nih.gov/">NIH</a> | <a class="text-white" href="https://www.hhs.gov/">HHS</a> | <a class="text-white" href="https://www.usa.gov/">USA.gov</a></p>
</div>
</div>
</div>
</footer>
<script src="//assets.nlm.nih.gov/uswds/js/uswds.min.js"></script>
<script src="//assets.nlm.nih.gov/jquery/jquery-latest.min.js"></script>
<script src="//assets.nlm.nih.gov/jquery/jquery-migrate-latest.min.js"></script>
<script src="/scripts/nlm_autocomplete.js"></script>
<script src="/scripts/nlm_uswds.js"></script>
</body>
</html>