Class: XmlToSqlParser

Source Location: /CORE/system/classes/parser/XmlToSqlParser.php

Class XmlToSqlParser

Class Overview

This class provides methods for easy parsing XML Files to SQL Statements.

Located in /CORE/system/classes/parser/XmlToSqlParser.php [line 42]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: XmlToSqlParser.php,v 1.5 2008/07/14 20:54:48 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
void   getError()  
void   getSchemaVersion()   Returns the Schema Version or FALSE.
void   getSqlArray()   Returns the Array with the parsed SQL Statements.
void   getVersionRegExp()  
void   get_file_contents()   Returns the content of the desired file.
void   parseFile()   Parses a XML File name identified by its canoncial Filename.
void   parseStructure()   Parses an XML Structure
void   prefix()   Converts the given Tablename into a prefixed one.
void   setAdoDBConnection()   Returns the prefixed Table Name.
void   setIgnoreVersionConflict()   Sets if we try to parse the Schema File, even if Version conflict is found.
void   setMode()   Sets the runtime mode for this XML Parsing.
void   setReplacer()   Returns the prefixed Table Name.
void   setTablePrefix()   Sets the Prefix for each Table.

[ Top ]
Methods
getError  [line 283]

  void getError( )



[ Top ]
getSchemaVersion  [line 224]

  void getSchemaVersion( $xmlstring  )

Returns the Schema Version or FALSE.

Parameters:
   $xmlstring: 


[ Top ]
getSqlArray  [line 209]

  void getSqlArray( )

Returns the Array with the parsed SQL Statements.



[ Top ]
getVersionRegExp  [line 126]

  void getVersionRegExp( )



[ Top ]
get_file_contents  [line 96]

  void get_file_contents( $file  )

Returns the content of the desired file.

Parameters:
   $file: 


[ Top ]
parseFile  [line 89]

  void parseFile( $filename  )

Parses a XML File name identified by its canoncial Filename.

Parameters:
   $filename: 


[ Top ]
parseStructure  [line 171]

  void parseStructure( $xml  )

Parses an XML Structure

Parameters:
   $xml: 


[ Top ]
prefix  [line 150]

  void prefix( $tableName  )

Converts the given Tablename into a prefixed one.

Parameters:
   $tableName: 


[ Top ]
setAdoDBConnection  [line 164]

  void setAdoDBConnection( &$connection  )

Returns the prefixed Table Name.

Parameters:
   &$connection: 


[ Top ]
setIgnoreVersionConflict  [line 134]

  void setIgnoreVersionConflict( [ $ignore = true]  )

Sets if we try to parse the Schema File, even if Version conflict is found.

Returns the current setting.

Parameters:
   $ignore: 


[ Top ]
setMode  [line 216]

  void setMode( $mode  )

Sets the runtime mode for this XML Parsing.

Parameters:
   $mode: 


[ Top ]
setReplacer  [line 157]

  void setReplacer( $replacer  )

Returns the prefixed Table Name.

Parameters:
   $replacer: 


[ Top ]
setTablePrefix  [line 143]

  void setTablePrefix( [ $prefix = '']  )

Sets the Prefix for each Table.

Parameters:
   $prefix: 


[ Top ]