PHP Classes

File: XML.php

Recommend this page to a friend!
  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: 18 years ago
Size: 998 bytes
 

Contents

Class file image Download
<?php

if ( isset ( $_GET['source'] ) AND $_GET['source'] == 1 )
{
    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'] == 2 )
{
    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'), false, false );
           
$XML->addValue ( 'Bitch' );
       
$XML->closeTag ( false );
   
$XML->closeTag ( );
$XML->closeTag ( );

echo
$XML->Go();

?>