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.

Installs: 8 508

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 6

Forks: 1

Open Issues: 0

pkg:composer/turnerlabs/validating-xml-encoder

0.3 2017-10-05 15:30 UTC

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);