NAME

blx::xsdsql::xml - read/write xml file from/to sql database

SYNOPSIS

use blx::xsdsql::xml

DESCRIPTION

this package is a class - instance it with the method new

FUNCTIONS

this module defined the followed functions

new - constructor

PARAMS:
	XMLWRITER  => instance of class XML::Writer
		if is not set the object instance automatically
	XMLPARSER  => instance of class XML::Parser
		if is not set the object instance automatically
	SQL_BINDING => instance of class blx::xsdsql::xml::sql_binding or a subclass
		if is not set the object instance automatically 
		but then params DB_NAMESPACE and DB_CONN must be set
	DB_NAMESPACE => set the property (Es: pg for postgres or oracle for oracle) used only if SQL_BINDING is not set
	DB_CONN     => DBI connection used only if SQL_BINDING is not set
	ROOT_TABLE => tree object tables - this is the output of method blx:.xsdsql::parser::parse
	SCHEMA_INSTANCE => schema instance (Ex: http://www.w3.org/2001/XMLSchema-instance) - default none
	SCHEMA_NAME     => schema name (Ex: schema.xsd) - default none

read - read a xml file and put into the database

PARAMS:
	FD   =>  input file description (default stdin) 
	ROOT_TABLE => root_table object (default param ROOT_TABLE in the constructor)
the method return the id inserted into the  root table

write - write a xml file from database

PARAMS:
	FD - output file descriptor (default stdout)
	ROOT_TABLE => root_table object (default param ROOT_TABLE in the constructor)
	ROOT_ID    => root_id - the result of the method read
	DELETE_ROWS     => if true write to FD and delete the rows from the database
	SCHEMA_INSTANCE => schema instance (default param SCHEMA_INSTANCE in the constructor 
	SCHEMA_NAME     => schema name (default the param SCHEMA_NAME in the constructor)
the method return the self object if root_id exist in the database else return undef

finish - close the sql statement prepared

the method return the self object

EXPORT

None by default.

EXPORT_OK

none

SEE ALSO

See blx:.xsdsql::generator for generate the schema of the database and blx::xsdsql::parser for parse a xsd file (schema file)

AUTHOR

lorenzo.bellotti, <pauseblx@gmail.com>

COPYRIG

Copyright (C) 2010 by lorenzo.bellotti

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html