A script to parse an XML schema and generate a list of PHP classes representing the nodes in the XML tree. The constructors for the classes have valildation set up based on the schema specifications.
License: GNU General Public License v3.0
PHP 100.00%
xsd2php's Introduction
An XML schema to PHP class generator
Released under the GPL, see COPYING
I offer no guarentees, either express or implied, that this software
and the classes it generates are fit for use. Use at own risk.
Usage: php xsd2php.php <schema.xml>
Will result in a number of classes being created in the current directory.
Each class has the following features
- list of properties representing xml children
- constructor which validate the children based upon type, and number
of occurances.
- Doc comments for the constructor
- validates against the PHPCodeSniffer PEAR coding standard check.
TODO: Change to use the DOM instead of simpleXML