PHPackages                             maniaplanet/manialib-xml - 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. maniaplanet/manialib-xml

Abandoned → [manialib/xml](/?search=manialib%2Fxml)Library[Parsing &amp; Serialization](/categories/parsing)

maniaplanet/manialib-xml
========================

Object-oriented PHP library for writing XML.

v0.1.1(12y ago)011.9k↑450%2MITPHPPHP &gt;=5.3

Since May 21Pushed 11y ago6 watchersCompare

[ Source](https://github.com/maniaplanet/manialib-xml)[ Packagist](https://packagist.org/packages/maniaplanet/manialib-xml)[ Docs](https://github.com/maniaplanet/manialib-xml)[ RSS](/packages/maniaplanet-manialib-xml/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)DependenciesVersions (4)Used By (2)

ManiaLib\\XML
=============

[](#manialibxml)

[![Latest Stable Version](https://camo.githubusercontent.com/194381ea18400b7891665da69a58be8acdd1effac1112145b578f1aaccc73cc4/68747470733a2f2f706f7365722e707567782e6f72672f6d616e6961706c616e65742f6d616e69616c69622d786d6c2f762f737461626c652e706e67)](https://packagist.org/packages/maniaplanet/manialib-xml)[![Latest Unstable Version](https://camo.githubusercontent.com/c0fddb4a57a4995ed8f95f732688dfb9316d75e485a3751a5412b7c4c6804e23/68747470733a2f2f706f7365722e707567782e6f72672f6d616e6961706c616e65742f6d616e69616c69622d786d6c2f762f756e737461626c652e737667)](https://packagist.org/packages/maniaplanet/manialib-xml)[![Total Downloads](https://camo.githubusercontent.com/837aba0b7523d075edda41489a8abae0c3be5706ce5c299a97ed4cd71a2ebbc3/68747470733a2f2f706f7365722e707567782e6f72672f6d616e6961706c616e65742f6d616e69616c69622d786d6c2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/maniaplanet/manialib-xml)[![Build](https://camo.githubusercontent.com/fba352c6b4f56197f99eb6e537e1c99c587e97390efbe2d06315aafd445a54a6/68747470733a2f2f7472617669732d63692e6f72672f6d616e6961706c616e65742f6d616e69616c69622d786d6c2e737667)](https://travis-ci.org/#!/maniaplanet/manialib-xml)

ManiaLib\\XML is an object-oriented PHP library for writing XML.

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

[](#installation)

[Install via Composer](https://getcomposer.org/):

```
{
	"require": {
        "maniaplanet/manialib-xml": "0.2.*@dev"
    }
}
```

Features
--------

[](#features)

- Simple and flexible object-oriented architecture
- Configurable rendering drivers
- Symfony\\Component\\EventDispatcher integration

Architecture
------------

[](#architecture)

- You construct a tree of `ManiaLib\XML\Node`.
- Setter methods return the element for chaining (eg. `$node->setNodeName('foo')->setNodeValue('bar');`.
- `ManiaLib\XML\Node::create()` instanciates the object and returns it for easy chaining (eg. `Node::create()->setNodeName('foo');`).
- If you're running PHP 5.4+ you can use class member access on instantiation instead eg. `(new Node)->setNodeName('foo');`.
- See `ManiaLib\XML\NodeInterface` for reference.
- You then pass the root `Node` to an instance of `ManiaLib\XML\Rendering\Renderer`.

Examples
--------

[](#examples)

```
