ePages 6.17.13 - 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

ImportObjects

Imports objects from an XML file.

Syntax
ImportObjects( $FileName );
ImportObjects( $FileName, $Path );
ImportObjects( $FileName, $Path, $cTransform );
Example
ImportObjects( 'DemoShop.xml', '/Shops/DemoShop' );
Input
$FileName (string)
XML file name
$Path (string)
(optional) path to parent object
$cTransform (ref.code)
(optional) transformer function, works like a hook for xml-imports making it possible
to react to the occurence of certain tags of attribute values - params are:
  • Object - object - DE_EPAGES::Object::API::Object::Object
  • LocalName - tag name - String
  • Attribute - this tags attributes - ref.hash

isOptional

Is current element optional imported ?

Syntax
$IsOptional = $Package->isOptional;
Return
$IsOptional (boolean)
true if the current element is marked as optional

isReference

Is current element imported as reference ?

Syntax
$IsReference = $Package->isReference;
Return
$IsReference (boolean)
true if the current element is marked as reference