PHPackages                             ilios/mesh-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ilios/mesh-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

ilios/mesh-parser
=================

PHP library for extracting MeSH descriptors from XML.

v5.0.0(3mo ago)10211.8k↓31.6%5MITPHPPHP &gt;=8.2CI failing

Since Dec 10Pushed 1mo ago12 watchersCompare

[ Source](https://github.com/ilios/mesh-parser)[ Packagist](https://packagist.org/packages/ilios/mesh-parser)[ Docs](https://iliosproject.org/)[ RSS](/packages/ilios-mesh-parser/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (9)Used By (0)

MeSH Parser
===========

[](#mesh-parser)

This PHP code library provides tools for extracting [Medical Subject Headings](https://www.nlm.nih.gov/mesh/meshhome.html)(MeSH) descriptors and associated data from a given XML file into an object representation.

It expects its input to be compliant with the 2025 or 2026 [MeSH DTDs](https://www.nlm.nih.gov/databases/download/mesh.html).

Installation
------------

[](#installation)

Use composer to add this library to your project.

```
composer require ilios/mesh-parser
```

Usage
-----

[](#usage)

Instantiate `\Ilios\MeSH\Parser` and invoke its `parse()` method with a URI that points at valid MeSH descriptors XML file.
This method call will return an instance of `\Ilios\MeSH\Model\DescriptorSet`; this is the entry point into the object representation of the descriptors data model.
Use getter methods on this object and its subcomponents to traverse and process this model.

### Example

[](#example)

```
