## Class XMLUserImporter

Description

This PHP Class imports users and groups data directly from a XML file.

- copyright: Copyright (c) 2004-2006 - Tecnick.com S.r.l (www.tecnick.com) - Via Ugo Foscolo n.19 - 09045 Quartu Sant'Elena (CA) - ITALY - www.tecnick.com - info@tecnick.com
- version: 1.0.000
- author: Nicola Asuni [www.tecnick.com]
- license: GPL
- abstract: XML users and groups importer
- name: XMLUserImporter

Located in /admin/code/tce_import_xml_users.php (line 138)

Variable Summary
string $current_data
string $current_element
array $group_data
array $user_data
int $user_id
string $xmlfile
Method Summary
XMLUserImporter __construct (string $xmlfile)
void __destruct ()
void endElementHandler (resource $parser, string $name)
void segContentHandler (resource $parser, string $data)
void startElementHandler (resource $parser, string $name, array $attribs)
Variables
string $current_data = "" (line 150)

- var: Current data value.
- access: private

string $current_element = "" (line 144)

- var: Current data element.
- access: private

array $group_data = array() (line 162)

- var: Array for storing user's group data.
- access: private

array $user_data = array() (line 156)

- var: Array for storing user data.
- access: private

int $user_id = 0 (line 168)

- var: ID of last inserted user (counter)
- access: private

string $xmlfile = "" (line 174)

- var: XML file
- access: private

Methods
Constructor __construct (line 180)

Class constructor.

- access: public

XMLUserImporter __construct (string $xmlfile)

- string $xmlfile: XML file name

Destructor __destruct (line 206)

Class destructor;

- access: public

void __destruct ()
endElementHandler (line 308)

Sets the end element handler function for the XML parser parser.end_element_handler.

- access: private

void endElementHandler (resource $parser, string $name)

- resource $parser: The first parameter, parser, is a reference to the XML parser calling the handler.
- string $name: The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters.

segContentHandler (line 435)

Sets the character data handler function for the XML parser parser.handler.

- access: private

void segContentHandler (resource $parser, string $data)

- resource $parser: The first parameter, parser, is a reference to the XML parser calling the handler.
- string $data: The second parameter, data, contains the character data as a string.

startElementHandler (line 218)

Sets the start element handler function for the XML parser parser.start_element_handler.

- access: private

void startElementHandler (resource $parser, string $name, array $attribs)

- resource $parser: The first parameter, parser, is a reference to the XML parser calling the handler.
- string $name: The second parameter, name, contains the name of the element for which this handler is called. If case-folding is in effect for this parser, the element name will be in uppercase letters.
- array $attribs: The third parameter, attribs, contains an associative array with the element's attributes (if any). The keys of this array are the attribute names, the values are the attribute values. Attribute names are case-folded on the same criteria as element names. Attribute values are not case-folded. The original order of the attributes can be retrieved by walking through attribs the normal way, using each(). The first key in the array was the first attribute, and so on.

Documentation generated on Fri, 24 Nov 2006 21:16:27 +0100 by phpDocumentor 1.3.0RC3