2017 © Pedro Peláez
 

library opmlparser

OPML parser

image

vipnytt/opmlparser

OPML parser

  • Saturday, May 7, 2016
  • by JanPetterMG
  • Repository
  • 1 Watchers
  • 1 Stars
  • 357 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Build Status Scrutinizer Code Quality Code Climate Test Coverage License Packagist Join the chat at https://gitter.im/VIPnytt/OPMLParser, (*1)

OPML parser

PHP class to parse OPML documents according to OPML 1.0 and OPML 2.0 specifications., (*2)

SensioLabsInsight, (*3)

Requirements:

Note: HHVM support is planned once facebook/hhvm#4277 is fixed., (*4)

Installation

The recommended way to install the robots.txt parser is through Composer. Add this to your composer.json file:, (*5)

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

Then run: php composer.phar update, (*6)

Getting Started

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

$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., (*7)

The Versions

07/05 2016

dev-master

9999999-dev https://github.com/VIPnytt/OPMLParser

OPML parser

  Sources   Download

MIT

The Requires

  • php >=5.6.0
  • ext-dom *
  • ext-simplexml *

 

The Development Requires

by Jan-Petter Gundersen
by VIP nytt

parser xml render opml