PHPackages                             vipnytt/opmlparser - 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. vipnytt/opmlparser

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

vipnytt/opmlparser
==================

OPML parser

31.7k1PHP

Since May 7Pushed 10y ago1 watchersCompare

[ Source](https://github.com/VIPnytt/OPMLParser)[ Packagist](https://packagist.org/packages/vipnytt/opmlparser)[ RSS](/packages/vipnytt-opmlparser/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/09352d8d7738cccebfd776bda2a646d69ef66df5349c72eb984af2d7cebcc48a/68747470733a2f2f7472617669732d63692e6f72672f5649506e7974742f4f504d4c5061727365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/VIPnytt/OPMLParser)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7800b8d300b04a232b53187cfece59bbe50cfef6155397629a687a27ca6df651/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5649506e7974742f4f504d4c5061727365722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/VIPnytt/OPMLParser/?branch=master)[![Code Climate](https://camo.githubusercontent.com/6094bd3f66178ce8588cb808f953800d859e3ca12707f3347f5f01075865990c/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f5649506e7974742f4f504d4c5061727365722f6261646765732f6770612e737667)](https://codeclimate.com/github/VIPnytt/OPMLParser)[![Test Coverage](https://camo.githubusercontent.com/9adb0ec4a3fb2a03cb221b551b8f5fb1b2dcda9bdc7053299f4e2aa8e20f321f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f5649506e7974742f4f504d4c5061727365722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/VIPnytt/OPMLParser/coverage)[![License](https://camo.githubusercontent.com/9eec150a84257db66ab766f2a5f5925924a1ce877cd11fcec216f20cffcb93b8/68747470733a2f2f706f7365722e707567782e6f72672f5649506e7974742f4f504d4c5061727365722f6c6963656e7365)](https://github.com/VIPnytt/OPMLParser/blob/master/LICENSE)[![Packagist](https://camo.githubusercontent.com/36eee2add4273c8455b82494cc9ca49e1c2e917a04b2ad45d86af09df949c757/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7669706e7974742f6f706d6c7061727365722e737667)](https://packagist.org/packages/vipnytt/opmlparser)[![Join the chat at https://gitter.im/VIPnytt/OPMLParser](https://camo.githubusercontent.com/382be1c4a76e64d4691888b43edc7e552b48b5f8446adbfb133ac89b9fbdf00b/68747470733a2f2f6261646765732e6769747465722e696d2f5649506e7974742f4f504d4c5061727365722e737667)](https://gitter.im/VIPnytt/OPMLParser)

OPML parser
===========

[](#opml-parser)

PHP class to parse OPML documents according to [OPML 1.0](http://dev.opml.org/spec1.html) and [OPML 2.0 specifications](http://dev.opml.org/spec2.html).

[![SensioLabsInsight](https://camo.githubusercontent.com/a0321bd581e3959c4b082dfc3895069043d33525b4a1ee6d7a74d402a64c3b4b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37333933613636322d373938382d346132612d383230622d6562616330316131613931662f6269672e706e67)](https://insight.sensiolabs.com/projects/7393a662-7988-4a2a-820b-ebac01a1a91f)

#### Requirements:

[](#requirements)

- PHP [&gt;=5.6](http://php.net/supported-versions.php)

Note: HHVM support is planned once [facebook/hhvm#4277](https://github.com/facebook/hhvm/issues/4277) is fixed.

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

[](#installation)

The recommended way to install the robots.txt parser is through [Composer](http://getcomposer.org). Add this to your `composer.json` file:

```
{
    "require": {
        "vipnytt/opmlparser": "1.0.*"
    }
}
```

Then run: `php composer.phar update`

Getting Started
---------------

[](#getting-started)

### Basic usage example

[](#basic-usage-example)

```
$parser = new vipnytt\OPMLParser($xml);

// Result as Array
$array = $parser->getResult()

// Validate the result
$object = $parser->validate()  // \SimpleXMLElement on success | false on failure
```

### Array rendering example

[](#array-rendering-example)

```
$render = new vipnytt\OPMLParser\Render($array, $version = '2.0');

// as SimpleXMLElement object
$object = $render->asXMLObject(); // \SimpleXMLElement

// as XML string
$string = $render->asXMLObject()->asXML(); // string
```

Note: OPML version 2.0 is used by default, unless you have specified otherwise. The difference between version 2.0 and 1.0 is the "text" attribute, witch is optional in version 1.0.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/26994e517317bb178af65b50893ef46ad3a1e6a54fe1fdd8056aece47620a703?d=identicon)[JanPetterMG](/maintainers/JanPetterMG)

---

Top Contributors

[![JanPetterMG](https://avatars.githubusercontent.com/u/11933090?v=4)](https://github.com/JanPetterMG "JanPetterMG (8 commits)")

### Embed Badge

![Health badge](/badges/vipnytt-opmlparser/health.svg)

```
[![Health](https://phpackages.com/badges/vipnytt-opmlparser/health.svg)](https://phpackages.com/packages/vipnytt-opmlparser)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19037.7M41](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9642.0k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

46143.1k6](/packages/jstewmc-rtf)[moonshine/layouts-field

Field for repeating groups of fields for MoonShine

107.9k](/packages/moonshine-layouts-field)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

112.9k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
