Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

generate PHP classes from XSD?

Tags:

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 schemas. Java and C# guys can get advantage of this by generating classes right from XSD. Is there same tool for PHP?

like image 200
Qwerty Avatar asked Feb 15 '10 02:02

Qwerty


1 Answers

I'm working now on this issue and going to release the tool as soon as it reaches more-less stable state. Check here http://mikebevz.com/xsd-to-php-tool/

Upd. I've just release first working prototype, it works fine with UBL 2.0 schemas and one simple schema, but more serious testing is on the way. I'd appreciate if you send schemas you're working with, so I'd include them in the test suite.

Upd. 2. XSD2PHP reached version 0.0.5. Check the progress on https://github.com/moyarada/XSD-to-PHP

like image 69
Mike Bevz Avatar answered Sep 28 '22 03:09

Mike Bevz