Is there in the world analogues of JavaBeans or JAXB for PHP? Is it possible to generate PHP classes from XML schema?
It\'s common practice to publish API\'s as XSD
The DMS Software Reengineering Toolkit is configurable code generation machinery, that can be used to process arbitrary formal documents as input. DMS can be used to generate code in arbitary output languages.
We have used it to generate native Java and COBOL XML readers and writers from DTDs, which are the elder cousin of schemas. The same ideas would be easily applied to PHP.
This library seems to be the best choice nowadays: https://github.com/goetas/xsd2php
It generates PHP classes for XML Elements and can convert it back and forth:
XML -> PHP -> XML