Fluent XML with the XP Framework

at 2010-06-22 in Examples by friebe (0 comments)

To create an XML tree programmatically, the XP Framework has offered the xml.Tree class since its beginning in 2001. Recently, we've added a fluent interface to it, allowing for the following:

<?php 
$t= create(new Tree())->withRoot(create(new Node('book'))
->withChild
(new Node('author', 'Timm'))
->withChild
(new Node('isbn', '978-0000000000'))
->withChild
(new Node('title', 'Fluent XML with the XP Framework'))
);
?>



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES

Related

Find related articles by a search for «Fluent».