turnerlabs/validating-xml-encoder

This package is abandoned and no longer maintained. No replacement package was suggested.

A XML Encoder that validates the result against an XSD.

Maintainers

👁 deviantintegral

Package info

github.com/turnerlabs/validating-xml-encoder

pkg:composer/turnerlabs/validating-xml-encoder

Statistics

Installs: 8 508

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

0.3 2017-10-05 15:30 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Apache-2.0 e9ed01aafec6cbe81fbf32a2889c658e4f0a07b5

  • Andrew Berry <andrew.berry.woop@lullabot.com>

This package is not auto-updated.

Last update: 2021-09-09 12:09:41 UTC


README

👁 CircleCI

This is a XML encoder that validates the result against an XSD. Works well with the Symfony Serialization Component and the Drupal Serializer.

<?php

$encoder = new \TurnerLabs\ValidatingXmlEncoder\Encoder('rootNodeName', $pathToXsd));
// If the encoded result of $data is not valid according to the XSD,
// \TurnerLabs\ValidatingXmlEncoder\Exception\XsdValidationException is thrown.
$xml = $encoder->encode($data);