2017 © Pedro Peláez
 

library xml

Library to abstract xml manipulation

image

innmind/xml

Library to abstract xml manipulation

  • Monday, February 12, 2018
  • by Baptouuuu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 492 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 8 % Grown

The README.md

XML

Build Status codecov Type Coverage, (*1)

This library is an abstraction on top of the \DOM* classes of php, the goal is to clarify the interfaces of each node., (*2)

The big differences are that each node is immutable and is only aware of its children (instead of being aware of its parent and siblings). This can allow you to extract a whole subtree and use it to build a new tree without affecting the original one., (*3)

Important: you must use vimeo/psalm to make sure you use this library correctly., (*4)

Installation

composer require innmind/xml

Usage

use Innmind\Xml\{
    Reader\Reader,
    Node,
};
use Innmind\Filesystem\File\Content;
use Innmind\Immutable\Maybe;

$read = Reader::of();

$tree = $read(
    Content\Lines::ofContent('<root><foo some="attribute"/></root>')
); // Maybe<Node>

Extract informations out of a node

The library use the visitor pattern to give access back to the raw xml library. For example you can access the parent of a node like this:, (*5)

use Innmind\Xml\Visitor\ParentNode;

$parent = ParentNode::of($childNode)($treeToSearchIn); // Maybe<Node>

Here is the full list of visitors you have access to by default:, (*6)

The Versions

12/02 2018

dev-master

9999999-dev http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

xml

12/02 2018

4.2.0

4.2.0.0 http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

xml

12/02 2018

dev-develop

dev-develop http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

xml

09/12 2017

4.1.0

4.1.0.0 http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

xml

19/09 2017

4.0.0

4.0.0.0 http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

xml

12/02 2017

3.0.0

3.0.0.0 http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

The Development Requires

xml

05/11 2016

2.0.0

2.0.0.0 http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

xml

30/10 2016

1.0.0

1.0.0.0 http://github.com/Innmind/XML

Library to abstract xml manipulation

  Sources   Download

MIT

The Requires

 

xml