ePages 6.10 - DE_EPAGES/Object/API/XML/ObjectImportHandler.pm

Package DE_EPAGES::Object::API::XML::ObjectImportHandler

This module implements a SAX2 handler to import object type(s) Object, Class, Attribute.

Base
DE_EPAGES::XML::API::BaseImportHandler
Example
use DE_EPAGES::Object::API::XML::ObjectImportHandler qw( ImportObjects );
ImportObjects( 'Objects.xml' );
@EXPORT_OK
ImportObjects

Functions

ImportObjects
isOptional
isReference
varsOnErrorString

ImportObjects

Imports objects from an XML file.

Syntax
ImportObjects( $FileName );
ImportObjects( $FileName, $Path );
Example
ImportObjects( 'DemoShop.xml', '/Shops/DemoShop' );
Input
$FileName (string)
XML file name
$Path (string)
(optional) path to parent object

isOptional

Is current element optional imported ?

Syntax
$IsOptional = $Package->isOptional;

isReference

Is current element imported as reference ?

Syntax
$IsReference = $Package->isReference;

varsOnErrorString

Returns information about the current position in the XML file.

Syntax
$Position = $self->varsOnError();
$Position = $self->varsOnError( $Element );
Input
$Element (object)
(optional) XML element (parameter of start_element)
Return
$Position (string)
parser information including: FileName, Script, XMLPosition