<?php
 
include("QXml.class.php");
 
 
$feeds = array(
 
        "opml" => array(
 
            "@attributes" => array("version" => 1.0),
 
            "head" => array(
 
                "title" => array("@textNode" =>"Feeds"),
 
                "dateCreated" => array("@textNode" => date("Y-m-d H:M:S")),
 
                "dateModified" => array("@textNode" => date("Y-m-d H:M:S")),
 
                "ownerName" => array("@textNode" => "Me"),
 
                "ownerEmail" => array("@textNode" => "[email protected]"),
 
                "link" => array("@textNode" => "http://www.example.com"),
 
            ),
 
            "body" => array(
 
                "outline" => array( 
 
                    array(
 
                        "@attributes" => array("text" => "Tech News"),
 
                        "outline" => 
 
                            array(
 
                                array(
 
                                    "@attributes" => array(
 
                                    "text" => "Mobile News", 
 
                                    "type"=>"link", 
 
                                    "url"=>"http://news4humans.com/feeds/mobile.xml", 
 
                                    "dateCreated"=>"Thu, 12 Sep 2003 23:35:52 GMT"),
 
                                ),
 
                                array(
 
                                    "@attributes" => array(
 
                                    "text" => "Syndication News", 
 
                                    "type"=>"link", 
 
                                    "url"=>"http://news4humans.com/feeds/mobile.xml", 
 
                                    "dateCreated"=>"Thu, 12 Sep 2003 23:35:52 GMT"),
 
                                ),
 
                            )
 
                        ),
 
                    array(
 
                        "@attributes" => array("text" => "World News"),
 
                        "outline" => 
 
                            array(
 
                                array(
 
                                    "@attributes" => array(
 
                                    "text" => "Politics", 
 
                                    "type"=>"link", 
 
                                    "url"=>"http://news4humans.com/feeds/mobile.xml", 
 
                                    "dateCreated"=>"Thu, 12 Sep 2003 23:35:52 GMT"),
 
                                ),
 
                                array(
 
                                    "@attributes" => array(
 
                                    "text" => "Sports", 
 
                                    "type"=>"link", 
 
                                    "url"=>"http://news4humans.com/feeds/mobile.xml", 
 
                                    "dateCreated"=>"Thu, 12 Sep 2003 23:35:52 GMT"),
 
                                ),
 
                            )
 
                        ),
 
                        
 
                ),                        
 
                    
 
            )
 
        )
 
    );
 
    
 
header("content-type:text/xml");
 
$xml = new QXML;
 
$xml->noCDATA();
 
$xml->toXML($feeds);
 
echo $xml->asXML();
 
 
?>
 
 |