Class XMLHandler

Description

This class handles the XML structure, and allows accessing and saving the information of the structure.

Located in /xmllib.php (line 57)


	
			
Variable Summary
mixed $XMLdata
Method Summary
XMLHandler __construct ( $parametros)
cmpNumElements ( $a,  $b)
cmpTypes ( $a,  $b)
cmpValues ( $a,  $b)
existsElementStructure ( $element)
isValid ()
loadXML ( $path)
removeFirstSlash ( $string)
void sortElements ()
string_begins_with ( $string,  $search)
void writeXML ()
Variables
mixed $XMLdata (line 60)
Methods
Constructor __construct (line 76)

Main constructor of the class.

  • access: public
XMLHandler __construct ( $parametros)
  • $parametros: It contains information of the set of characters to use. It is passed through the modelclass class.
cmpNumElements (line 453)

Function that is used to compare two elements of an array of elements.

  • return: 1 if the element are already placed in order.
cmpNumElements ( $a,  $b)
  • $a: First element to compare.
  • $b: Second element to compare
cmpTypes (line 444)

Function that is used to compare two elements of an array of elements.

  • return: 1 if the element are already placed in order.
cmpTypes ( $a,  $b)
  • $a: First element to compare.
  • $b: Second element to compare
cmpValues (line 462)

Function that is used to compare two elements of an array of elements.

  • return: 1 if the element are already placed in order.
cmpValues ( $a,  $b)
  • $a: First element to compare.
  • $b: Second element to compare
existsElementStructure (line 482)

This function checks if exists an element in the structure

  • return: True if exists, false otherwise.
existsElementStructure ( $element)
  • $element: String with the name of the element.
isValid (line 95)

This function check if a XML is valid refered to its DTD.

  • return: True if XML is validate, false otherwise.
  • access: public
isValid ()
loadXML (line 116)

This function will load all the nodes contained inside the XML structure into the database.

  • return: True if the XML has been correctly loaded. False otherwise.
  • access: public
loadXML ( $path)
  • $path: Path where the XML is located.
removeFirstSlash (line 503)

Auxiliar function to remove the first slash of a string.

  • return: String with the first slash removed
removeFirstSlash ( $string)
  • $string: String to handle
sortElements (line 434)

Sort an array using a function to compare elements.

void sortElements ()
string_begins_with (line 472)

Check if a string begins with another string given as a parameter.

  • return: It returns true if the string is found it, false otherwise.
string_begins_with ( $string,  $search)
  • $string: String to check
  • $search: String to be found it
writeXML (line 188)
void writeXML ()

Documentation generated by phpDocumentor 1.4.3
Modified by Sergio Barja for S2 - Hierarchical Data Model documentation.