Login   Register  
PHP Classes
elePHPant
Icontem

File: XML.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of James Logdson  >  Syndication Classes  >  XML.php  >  Download  
File: XML.php
Role: Example script
Content type: text/plain
Description: XML Example
Class: Syndication Classes
Generate XML and RSS feeds
Author: By
Last change: Set $XML->debug = true
Date: 2005-12-11 13:25
Size: 998 bytes
 

Contents

Class file image Download
<?php

if ( isset ( $_GET['source'] ) AND $_GET['source'] == )
{
    echo 
'<a href=\'./XML.php\'>Back</a><br />';
    echo 
'<a href=\'./XML.php?source=2\'>View XML.php</a><br />';
    
highlight_file './SC_XML.class.php' );
    exit;
}
else if ( isset ( 
$_GET['source'] ) AND $_GET['source'] == )
{
    echo 
'<a href=\'./XML.php\'>Back</a><br />';
    echo 
'<a href=\'./XML.php?source=1\'>View SC_XML.class.php</a><br />';
    
highlight_file './XML.php' );
    exit;
}

require_once 
"SC_XML.class.php";

echo 
'<a href=\'./XML.php?source=1\'>View SC_XML.class.php</a><br />';
echo 
'<a href=\'./XML.php?source=2\'>View XML.php</a><br />';

$XML = new SC_XML "1.0" );
$XML->debug true;

$XML->openTag 'someTag' );
    
$XML->openTag 'andWeHave' );
        
$XML->openTag 'TagsthatAreCool', array('testAttribute'=>'myValue','second'=>'attribute'), falsefalse );
            
$XML->addValue 'Bitch' );
        
$XML->closeTag false );
    
$XML->closeTag ( );
$XML->closeTag ( );

echo 
$XML->Go();

?>