PHPackages                             mpi2/xmldatatype - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. mpi2/xmldatatype

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

mpi2/xmldatatype
================

Mapping of XML datatypes to PHP Classes with validation

061PHP

Since May 19Pushed 12y ago1 watchersCompare

[ Source](https://github.com/mpi2/xmldatatype)[ Packagist](https://packagist.org/packages/mpi2/xmldatatype)[ RSS](/packages/mpi2-xmldatatype/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

XML Datatype Mappings to PHP Classes
====================================

[](#xml-datatype-mappings-to-php-classes)

This package is a bunch of PHP classes that map primitive XML data types and a few other ones. The classes have some built-in validation checking so they throw an `Exception` if you try to assign the wrong value type.

The best way to get started using this package is to install [Composer](http://getcomposer.org/) and find the package on [Packagist](http://packagist.org/) to add it as a dependency.

Example of basic usage:

```
