dev-master
9999999-dev https://github.com/possi/jas_xmlA XML (Un-)Serialization Library, full configureable via annotations.
MIT
The Requires
xml serialization annotation
A XML (Un-)Serialization Library, full configureable via annotations.
A XML (Un-)Serialization Library, full configureable via annotations., (*1)
Add this line to your composer.json "require" section:, (*2)
"require": { ... "jas/xml": "*"
use jas\xml\Meta as Xml; /** * @Xml\Document(rootNode = "foo") */ class MyObject { /** * @var int * @Xml\Attribute(name="bar") */ protected $foo = 4; /** * @var string * @Xml\Element(name="hello") */ protected $bar = "hello world"; } $xml = jas\xml\Writer::toXML(new MyObject); -> /* <foo bar="4"> <hello>world</hello> </foo> */ $myobject = jas\xml\Reader::fromXML('MyObject', $xml);
A XML (Un-)Serialization Library, full configureable via annotations.
MIT
xml serialization annotation