I have this xml feed ...
<products>
<product>
<manufacturer_name>2CARS</manufacturer_name>
<quantity>1081</quantity>
<price>2.25</price>
<ean13>8586017592520</ean13>
<reference>92520</reference>
<weight>0.01</weight>
<descriptions>
**<descriptions>**
<description>LED Autožiarovka 2LED 12V 5050SMD T10, biela.</description>
<description_short>LED Autožiarovka</description_short>
<name>4CARS LED ŽIAROVKA 2LED 12V 5050SMD T10</name>
**</descriptions>**
</descriptions>
<images>
<image>
https://2cars.eu/upload/products-import/hd/92520_01.jpg
</image>
</images>
<default_category>
<category_default_name>LED žiarovky</category_default_name>
</default_category>
<product_category_tree>Elektro a Hifi > Osvetlenie > LED žiarovky</product_category_tree>
<hmotnos__>0.0094</hmotnos__>
<balenie>2 ks</balenie>
<farba/>
</product>
<products>
... and this part of script ...
{
$product_description[] = array(
'product_id' => $product_id,
'lang_id' => $lang_id,
'name' => (string) $product->name,
'url' => url( (string) $product->name ),
'short_info' => (string) $product->description_short,
'description' => (string) $product->description
);
}
.. the result is:
can not be imported, I guess because the grandchildren subgroup is hidden to it, but how to let him know to use it.
Please, can anybody help me?
Related
My company uses has a lot of internal APIs that use very specific header and formatting requirements. I am new to SOAP::Lite and I'm trying to make it work within the company's framework.
Try #1:
Ideally, I would like to be able to just take the raw XML template (see bottom of the post), populate some placeholder variables, and send it to the endpoint using the following code:
my $client = SOAP::Lite->new( proxy => "$serviceURL");
my $reply = $client->InquireEnterpriseOrderDataRequest($rawxml);
However, this results in my header and request sections being enclosed in it's own "envelope", "body" and "InquireEnterpriseOrderDataRequest" which is rejected by the service.
Try #2:
The next thing I tried was to break my request into two pieces: header and request and use SOAP::Data and SOAP::Header to send those:
my $rawxmlheader = '<ns2:MessageHeader xmlns:ns2="http://mycompany.com/MessageHeader.xsd" xmlns="http://mycompany.com/CingularDataModel.xsd">
<ns2:TrackingMessageHeader>
<version>111</version>
<originalVersion/>
<messageId/>
<originatorId>ABC</originatorId>
<responseTo/>
<returnURL/>
<timeToLive>360000</timeToLive>
<conversationId>9AF0E9281A524262980F5284F4C57888_CCE423E277C74FA9A84D2155CD612EB3_0</conversationId>
<routingRegionOverride/>
<dateTimeStamp>2017-05-12T12:47:53Z</dateTimeStamp>
<uniqueTransactionId>mytransid</uniqueTransactionId>
</ns2:TrackingMessageHeader>
<ns2:SecurityMessageHeader>
<userName>myusername</userName>
<userPassword>mypass</userPassword>
</ns2:SecurityMessageHeader>
<ns2:SequenceMessageHeader>
<sequenceNumber/>
<totalInSequence/>
</ns2:SequenceMessageHeader>
</ns2:MessageHeader>';
my $rawxmlrequest = '<OrderSearchCriteria>
<OrderDetails>
<SearchByOrderAction>
<orderActionNumber>12345654</orderActionNumber>
<orderActionVersion>1</orderActionVersion>
</SearchByOrderAction>
</OrderDetails>
</OrderSearchCriteria>
<provisioningDetailsIndicator>true</provisioningDetailsIndicator>';
my $client = SOAP::Lite->new( proxy => "$serviceURL");
my $header = SOAP::Header->type('xml' => $rawxmlheader);
my $elem = SOAP::Data->type('xml' => $rawxmlrequest);
my #arguments;
push(#arguments, $header);
push(#arguments, $elem);
my $reply = $client->InquireEnterpriseOrderDataRequest(#arguments);
This produced a very similar request to what was needed with the exception that the InquireEnterpriseOrderDataRequest blob did not contain the xsi:schemaLocation, xmlns or xmlns:xsi values that seem to be required.
Try #3:
Now I was grasping at straws, so I also tried to granularly create my own XML using something like this:
my $temp_elements =
SOAP::Data->name("OrderSearchCriteria" => \SOAP::Data->value(
SOAP::Data->name("OrderDetails" => \SOAP::Data->value(
SOAP::Data->name("SearchByOrderAction" => \SOAP::Data->value(
SOAP::Data->name("orderActionNumber" => '301496944'),
SOAP::Data->name("orderActionVersion" => '3')
)
)
)
))
)->type("SomeObject");
my $client = SOAP::Lite->new( proxy => "$serviceURL");
my $reply = $client->InquireEnterpriseOrderDataRequest($temp_elements);
The problem here was that I don't know how to include the xsi:schemaLocation, xmlns and xmlns:xsi values or prepend the header information.
Of course, I'd like to go with the simplest possible implementation but any suggestions are appreciated! Thanks in advance!
Required request format:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<ns2:MessageHeader xmlns:ns2="http://mycompany.com/MessageHeader.xsd" xmlns="http://mycompany.com/CingularDataModel.xsd">
<ns2:TrackingMessageHeader>
<version>111</version>
<originalVersion/>
<messageId/>
<originatorId>ABC</originatorId>
<responseTo/>
<returnURL/>
<timeToLive>360000</timeToLive>
<conversationId>9AF0E9281A524262980F5284F4C57888_CCE423E277C74FA9A84D2155CD612EB3_0</conversationId>
<routingRegionOverride/>
<dateTimeStamp>2017-04-11T18:47:53Z</dateTimeStamp>
<uniqueTransactionId>mytransid</uniqueTransactionId>
</ns2:TrackingMessageHeader>
<ns2:SecurityMessageHeader>
<userName>myusername</userName>
<userPassword>mypass</userPassword>
</ns2:SecurityMessageHeader>
<ns2:SequenceMessageHeader>
<sequenceNumber/>
<totalInSequence/>
</ns2:SequenceMessageHeader>
</ns2:MessageHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<InquireEnterpriseOrderDataRequest xsi:schemaLocation="http://mycompany.com/InquireEnterpriseOrderDataRequest.xsd" xmlns="http://mycompany.com/InquireEnterpriseOrderDataRequest.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OrderSearchCriteria>
<OrderDetails>
<SearchByOrderAction>
<orderActionNumber>12345654</orderActionNumber>
<orderActionVersion>1</orderActionVersion>
</SearchByOrderAction>
</OrderDetails>
</OrderSearchCriteria>
<provisioningDetailsIndicator>true</provisioningDetailsIndicator>
</InquireEnterpriseOrderDataRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This should generate the required response using SOAP::Lite request.
use strict;
use warnings;
use SOAP::Lite +trace=>'all';
$on_action = '';
$proxy = 'http://serviceURL';
$soap = SOAP::Lite->new(proxy => $proxy);
$soap->on_action(sub {$on_action});
$soap->readable(1);
$soap->autotype(0);
$soap->serializer->register_ns('http://mycompany.com/InquireEnterpriseOrderDataRequest.xsd' => 'xsi');
$soap->serializer->register_ns('http://mycompany.com/InquireEnterpriseOrderDataRequest.xsd' => 'xsi:schemaLocation');
$soap->default_ns('http://mycompany.com/InquireEnterpriseOrderDataRequest.xsd');
$soap->envprefix('SOAP-ENV');
$sheader = SOAP::Header->name(MessageHeader =>\SOAP::Header->value(SOAP::Header->name(TrackingMessageHeader => \SOAP::Header->value(
SOAP::Header->name(version => 111),
SOAP::Header->name(originalVersion => ''),
SOAP::Header->name(messageId => ''),
SOAP::Header->name(originatorId => 'ABC'),
SOAP::Header->name(responseTo => ''),
SOAP::Header->name(returnURL => ''),
SOAP::Header->name(timetoLive => 360000),
SOAP::Header->name(conversationId => '9AF0E9281A524262980F5284F4C57888_CCE423E277C74FA9A84D2155CD612EB3_0'),
SOAP::Header->name(routingRegionOverride => ''),
SOAP::Header->name(dateTimeStamp => '2017-04-11T18:47:53Z'),
SOAP::Header->name(timetoLive => 'mytransid'),
))->prefix('ns2')))->attr({'xmlns:ns2' => 'http://mycompany.com/MessageHeader.xsd',xmlns => 'http://mycompany.com/CingularDataModel.xsd'})->prefix('ns2');
push #request,(
SOAP::Data->name(OrderSearchCriteria => \SOAP::Data->value(
SOAP::Data->name(OrderDetails => \SOAP::Data->value(
SOAP::Data->name(SearchByOrderAction => \SOAP::Data->value(
SOAP::Data->name(orderActionNumber => 12345654),
SOAP::Data->name(orderActionVersion => 1),
)))))));
$reply = $soap->InquireEnterpriseOrderDataRequest($sheader,#request);
I'm trying to create a extension to modify fields in a different extension.
My extension needs to add and disable fields in fe_users over the TSConfig Page.
Ive looked over google how to do this with a own extension. But I didn't find anything usefull that I could work with.
(Edited)
The admin shouldn't be able to see these fields:
Company
Name
Middle name
Address
Zipcode
Land
Phone
Fax
www
Image
TSConfig
Bind a Domain
Redirect after login
Start
Stop
Record Type
These fields should be added
Customer (INT, not able to edit on display) Manditory
swissaxis_id (INT, Unique number) if possible only displayable and
not editing possibility
shop_rights (Textarea, No defined Value. The Rights will be saved
there serialised.)
fe_groups
These fields shouldn't be displayed to any Admin
Bind a domain
TSConfig
Redirect after login
Record Type
I'm thankfull for any Feedback possible.
Here's a link on how you add new fields to fe_users: https://docs.typo3.org/typo3cms/TCAReference/ExtendingTca/Index.html
https://docs.typo3.org/typo3cms/TCAReference/ExtendingTca/Examples/Index.html
I'll give you an example from an old, makeshift extension zusatzfelder of mine that modifies the "pages" table. It's really old, please verify if everything is current. You can also look at any other, "real" extension...
ext_emconf.php (maybe created by extension_builder)
<?php
########################################################################
# Extension Manager/Repository config file for ext "zusatzfelder".
#
# Auto generated 29-08-2011 15:33
#
# Manual updates:
# Only the data in the array - everything else is removed by next
# writing. "version" and "dependencies" must not be touched!
########################################################################
$EM_CONF[$_EXTKEY] = array(
'title' => 'Zusatzfelder',
'description' => '',
'category' => '',
'author' => '',
'author_email' => '',
'shy' => '',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
'module' => '',
'state' => '',
'internal' => '',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'author_company' => '',
'version' => '0.0.0',
'constraints' => array(
'depends' => array(
),
'conflicts' => array(
),
'suggests' => array(
),
),
'_md5_values_when_last_written' => 'a:8:{s:9:"ChangeLog";s:4:"5b94";s:10:"README.txt";s:4:"ee2d";s:12:"ext_icon.gif";s:4:"1bdc";s:14:"ext_tables.php";s:4:"474a";s:14:"ext_tables.sql";s:4:"ead9";s:16:"locallang_db.xml";s:4:"7a92";s:19:"doc/wizard_form.dat";s:4:"0cba";s:20:"doc/wizard_form.html";s:4:"29e8";}',
);
?>
ext_tables.sql
CREATE TABLE pages (
tx_zusatzfelder_contentnav_title_addition tinytext,
tx_zusatzfelder_contentnav_title tinytext,
tx_zusatzfelder_contentnav_disable int(11) DEFAULT '0' NOT NULL,
);
ext_tables.php
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
$tempColumns = array (
'tx_zusatzfelder_contentnav_title' => array (
'exclude' => 0,
'label' => 'LLL:EXT:zusatzfelder/locallang_db.xml:pages.tx_zusatzfelder_contentnav_title',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'tx_zusatzfelder_contentnav_title_addition' => array (
'exclude' => 0,
'label' => 'LLL:EXT:zusatzfelder/locallang_db.xml:pages.tx_zusatzfelder_contentnav_title_addition',
'config' => array (
'type' => 'input',
'size' => '30',
)
),
'tx_zusatzfelder_contentnav_disable' => array (
'exclude' => 0,
'label' => 'LLL:EXT:zusatzfelder/locallang_db.xml:pages.tx_zusatzfelder_contentnav_disable',
'config' => array (
'type' => 'check',
'default' => '0',
)
),
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages',$tempColumns,1);
// http://typo3-blog.net/tutorials/news/addtoalltcatypes.html
// PS: the "after:"... is for placement in the BE, stopped working last week...
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages','tx_zusatzfelder_contentnav_title;;;;1-1-1','','after:subtitle');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages','tx_zusatzfelder_contentnav_title_addition;;;;1-1-1','','after:subtitle');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages','tx_zusatzfelder_contentnav_disable;;;;1-1-1','','after:subtitle');
?>
locallang_db.xml
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>database</type>
<description>Language labels for database tables/fields belonging to extension 'zusatzfelder'</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="pages.tx_zusatzfelder_contentnav_title_addition">Untermenu: Vorlauf Titel (zB. "Mehr zur")</label>
<label index="pages.tx_zusatzfelder_contentnav_title">Untermenu: Titellink anderer Text (Standard: Seitentitel; Leerschlag: kein Titel)</label>
<label index="pages.tx_zusatzfelder_contentnav_disable">Untermenu ausblenden</label>
</languageKey>
</data>
</T3locallang>
That's all you need to add new fields – you don't even need the locallang if you just prefer to do 'label' => 'My untranslated Label', in ext_tables.php.
I try to parse an xml document using XML::Simple perl parsing.
I noticed, if the document looks like:
<?xml version="1.0" encoding="UTF-8"?>
<fields>
<field>
<f1>1234</f1>
<name>MyName1</name>
</field>
</fields>
the result of print(Dumper($ref)); looks as expected:
$VAR1 = {
'field' => {
'f1' => '1234',
'name' => 'MyName1'
}
};
while if I have more than one list in the document:
<?xml version="1.0" encoding="UTF-8"?>
<fields>
<field>
<f1>1234</f1>
<name>MyName1</name>
</field>
<field>
<f1>567</f1>
<name>MyName2</name>
</field>
</fields>
the results looks like:
$VAR1 = {
'field' => {
'MyName1' => {
'f1' => '1234'
},
'MyName2' => {
'f1' => '567'
}
}
};
while expected results would be:
$VAR1 = { [
'field' => {
'f1' => '1234',
'name' => 'MyName1'
},
'field' => {
'f1' => '567',
'name' => 'MyName2'
}
]
};
what options of XML::Simple parser will prevent tag content substitution with the tag reference and use an array of <field> instead?
By default. XML::Simple names hash keys by the values of tags <name>, <key> and <id>. You can customize this behavior via KeyAttr setting.
Thus, the code which produces the structure closest to what you expect is:
#!/usr/bin/env perl
use common::sense;
use Data::Dumper;
use XML::Simple;
local $/ = undef;
say Dumper XMLin(<DATA>, KeyAttr => []);
__DATA__
<?xml version="1.0" encoding="UTF-8"?>
<fields>
<field>
<f1>1234</f1>
<name>MyName1</name>
</field>
<field>
<f1>567</f1>
<name>MyName2</name>
</field>
</fields>
And here is the output:
$VAR1 = {
'field' => [
{
'f1' => '1234',
'name' => 'MyName1'
},
{
'f1' => '567',
'name' => 'MyName2'
}
]
};
Use the ForceArray => 'field' option to XMLin.
In general you cannot mold the data structures that XML::Simple returns to whatever you want them to. XML::Simple is too simple for that. However, your use case is one that is described in the documentation. I suggest you read the documentation to all items that are marked as important at least, because it really helps knowing what your options are in shaping structures returned by XML::Simple.
Looking for a better Breadcrumb solution for a Zend Framework project.
Currently I have a navigation.xml like
<?xml version="1.0" encoding="UTF-8"?>
<configdata>
<nav>
<home>
<label>Home</label>
<module>default</module>
<controller>index</controller>
<action>index</action>
<pages>
<countryurl>
<label>Spain</label>
<module>default</module>
<controller>country</controller>
<action>index</action>
<route>country_url</route>
<params>
<country>spain</country>
</params>
<pages>
<provinceurl>
<label>Madrid</label>
<module>default</module>
<controller>country</controller>
<action>province</action>
<route>province_url</route>
<params>
<country>spain</country>
<province>madrid</province>
</params>
<pages>
<cityurl>
<label>City</label>
<module>default</module>
<controller>country</controller>
<action>city</action>
<route>city_url</route>
<params>
<country>spain</country>
<province>madrid</province>
<city>madrid</city>
</params>
<pages>
<producturl>
<label>Product</label>
<module>default</module>
<controller>country</controller>
<action>product</action>
<route>product_url</route>
<params>
<country>spain</country>
<province>madrid</province>
<city>madrid</city>
<product>product</product>
</params>
</producturl>
</pages>
</cityurl>
</pages>
</provinceurl>
</pages>
</countryurl>
</pages>
</home>
</nav>
</configdata>
and routes like
$router->addRoute(
'product_url',
new Zend_Controller_Router_Route(':lang/:country/:province/:city/:product', array(
'controller' => 'country',
'action' => 'product'
))
);
$router->addRoute(
'city_url',
new Zend_Controller_Router_Route(':lang/:country/:province/:city', array(
'controller' => 'country',
'action' => 'city'
))
);
$router->addRoute(
'province_url',
new Zend_Controller_Router_Route(':lang/:country/:province', array(
'controller' => 'country',
'action' => 'province'
))
);
$router->addRoute(
'country_url',
new Zend_Controller_Router_Route(':lang/:country', array(
'controller' => 'country',
'action' => 'index'
))
);
I am facing some issues / looking for some suggestions . Creating the Breadcrumbs with the help of Zend_Navigation
$config = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
$container = new Zend_Navigation($config);
$view->navigation($container);
1 ) The request for http://example.com/en/spain/madrid/madrid/product shows the breadcrumb, with the help of
$this->navigation()
->breadcrumbs()
->setMinDepth(0)
->setLinkLast(true)
->setSeparator(" > ");
as Home > Spain > Madrid > City > Product
But the links pointing at Spain , Madrid , City all are to http://example.com . Which should be http://example.com/en/spain , http://example.com/en/spain/madrid , http://example.com/en/spain/madrid/madrid respectively.
2 ) Currently when the request for http://example.com/en/spain
the breadcrumb will show Home >> Spain
<label>Spain</label>
<module>default</module>
<controller>country</controller>
<action>index</action>
<route>country_url</route>
<params>
<country>spain</country>
</params>
But you can see the param country differs according to country. So do we want to add the labels for all countries ?
http://example.com/en/spain
Home >> Spain
http://example.com/en/india
Home >> India
I have provinces , city and product coming along, any suggestions how I can build for it ?
Also this is a multilingual website, so how can we make the necessary changes to the label? I guess if we are using Zend_Translate it will make the necessary changes.
You can create your own page class that treats params beginning with : as dynamic. You can reference it in the nav configuration like
...
<countryurl>
<label>:country</label> <!-- dynamic -->
<module>default</module>
<controller>index</controller>
<action>index</action>
<route>country_url</route>
<type>DynamicNavPage</type> <!-- page classname -->
<params>
<country>:country</country> <!-- dynamic -->
</params>
<pages>
...
and for example
<?php
class DynamicNavPage extends Zend_Navigation_Page_Mvc {
/**
* Params with ":" are read from request
*
* #param array $params
* #return Zend_Navigation_Page_Mvc
*/
public function setParams(array $params = null) {
$requestParams = Zend_Controller_Front::getInstance()
->getRequest()->getParams();
//searching for dynamic params (begining with :)
foreach ($params as $paramKey => $param) {
if (substr($param, 0, 1) == ':' &&
array_key_exists(substr($param, 1), $requestParams)) {
$params[$paramKey] = $requestParams[substr($param, 1)];
}
}
return parent::setParams($params);
}
/**
* If label begining with : manipulate (for example with Zend_Tanslate)
*/
public function setLabel($label) {
if (substr($label, 0, 1) == ':') {
//label modifications go here
//as an example reading it from page params and capitalizing
//can use Zend_Translate here
$requestParams = Zend_Controller_Front::getInstance()
->getRequest()->getParams();
$labelParamKey = substr($label, 1);
if (array_key_exists($labelParamKey, $requestParams)) {
$label = ucfirst($requestParams[$labelParamKey]);
}
}
return parent::setLabel($label);
}
}
I am using Perl with XML::Simple to convert a hash into an XML document.
My script looks as follows:
#!/usr/bin/perl
use strict;
use warnings;
use XML::Simple;
use Data::Dumper;
my $xml_simple = XML::Simple->new( NoAttr => 1,
KeepRoot => 1);
my $hash = { output => { 'products' => [ { 'product' => { 'titel' => 'ABN AMRO Bank hypotheken',
'owner' => 'ABN AMRO Hypotheken Groep',
'code' => 'ABN AMRO BANK R' } },
{ 'product' => { 'titel' => 'Aegon',
'owner' => 'AEGON Hypotheken',
'code' => 'AEGON pilot' } } ],
'date' => '2012-02-20'} };
my $xml = $xml_simple->XMLout( $hash );
print Dumper( $xml );
The output I am getting is:
<output>
<date>2012-02-20</date>
<products>
<name>product</name>
<code>ABN AMRO BANK R</code>
<owner>ABN AMRO Hypotheken Groep</owner>
<titel>ABN AMRO Bank hypotheken</titel>
</products>
<products>
<name>product</name>
<code>AEGON pilot</code>
<owner>AEGON Hypotheken</owner>
<titel>Aegon</titel>
</products>
</output>
but what I am looking for is this (see the 'product' nodes):
<output>
<date>2012-02-20</date>
<products>
<product>
<code>ABN AMRO BANK R</code>
<owner>ABN AMRO Hypotheken Groep</owner>
<titel>ABN AMRO Bank hypotheken</titel>
</product>
<product>
<code>AEGON pilot</code>
<owner>AEGON Hypotheken</owner>
<titel>Aegon</titel>
</product>
</products>
</output>
Is this doable with XML::Simple or should I use a different module?
You can let XML::Simple tell you what data structure it wants
#!/usr/bin/perl
use strict;
use warnings;
use XML::Simple;
use Data::Dumper;
my $desired_xml = << 'END';
<myxml>
<output>
<date>2012-02-20</date>
<products>
<product>
<code>ABN AMRO BANK R</code>
<owner>ABN AMRO Hypotheken Groep</owner>
<titel>ABN AMRO Bank hypotheken</titel>
</product>
<product>
<code>AEGON pilot</code>
<owner>AEGON Hypotheken</owner>
<titel>Aegon</titel>
</product>
</products>
</output>
</myxml>
END
#print $desired_xml;
my $xml_simple = XML::Simple->new(
NoAttr => 1,
KeepRoot => 1
);
#my $hash = XMLin( $desired_xml, forcearray => 1 );
my $hash = {
output => [
{
date => ["2012-02-20"],
products => [
{
product => [
{
code => ["ABN AMRO BANK R"],
owner => ["ABN AMRO Hypotheken Groep"],
titel => ["ABN AMRO Bank hypotheken"],
},
{
code => ["AEGON pilot"],
owner => ["AEGON Hypotheken"],
titel => ["Aegon"],
},
],
},
],
},
],
};
#print Data::Dumper->Dump( [$hash], [qw(hash)] );
my $xml = $xml_simple->XMLout($hash);
print Data::Dumper->Dump( [$xml], [qw(xml)] );