Pas 3.6 > Pas / Class / XMLRegistryLoad.class.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Pas 3.6

Download:
pas-3.6.zip

Category:
Development Tools

Archive Content:

Pas > Class > Mysql

Pas > Class

Pas > Class > Odbc

Pas > Class > Pgsql

Pas

Pas > Events

Pas > Registry

Pas > Scripts

Pas > Sitetemplate

Pas > Sitetemplate > Includes

Pas > Sitetemplate > Report

Pas > Templates

Pas > Templates > Packagedefaultstructure > Docs > Defaultstructure

Pas > Templates > Packagedefaultstructure

XMLRegistryLoad.class.php:


<?php 
// Copyright 2001 - 2004 SQLFusion LLC           info <at> sqlfusion <dot> com

  /**
   * XML Registry Load class
   * Basic XML manipulation,  will need rewrite
   *   
   * @author Philippe Lewicki  <phil <at> sqlfusion <dot> com>
   * @copyright  SQLFusion LLC 2001-2004
   * @version 3.0
   * @package PASClass
   * @access public
   */

class XMLRegistryLoad extends XMLBaseLoad {
  var 
$open_tags = array(
    
'RFIELD' => '<RFIELD>',
    
'RDATA' => '<RDATA>');

  var 
$close_tags = array(
    
'RFIELD' => '</RDATA>',
    
'RDATA' => '</RDATA>');

  var 
$finaldata ;

  function 
startElement($parser,  $name,  $attrs=''){
    
$this->current_tag $name;
    if (
$format $this->open_tags[$name]){
        switch(
$name){
            case 
'RFIELD':
                
$this->current_field $attrs[NAME] ;
            break;
            case 
'RDATA':
                
$this->current_type $attrs[TYPE] ;
            break ;
            default:
            break;
        }
    }
}

  function 
endElement($parser,  $name,  $attrs=''){
    if (
$format $this->close_tags[$name]){
    switch(
$name){
        case 
'RFIELD':
          
$this->current_field ="" ;
        break;
        case 
'RDATA':
          
$this->finaldata[$this->current_field][$this->current_type] = trim($this->current_data) ;
          
$this->current_type "" ;
          
$this->current_data "" ;
        break ;
        default:
        break;
    }
    }
  }

  function 
characterData($parser,  $data){
    switch(
$this->current_tag){
    case 
'RDATA':
      
$this->current_data .= $data ;
      break;
    default:
        break;
    }
  }
}
?>



Other Development Tools Scripts:

WebMaster Resources Home

©RingsWorld.com