Good day to all!
Here is stuck on the Russian- XML
'ke. There is an English version:
<messages> <parametr> <catalogue id="10" catalogname="Каталог 1"> <name tovname="Товар 1"/> <text tovtext="текст о товаре 1"/> <price internet="95" rozn="100" opt="90"/> </catalogue> </parametr> </messages>
Next, an example handler:
foreach ($xml->parametr as $parametr) { foreach ($parametr->catalogue as $catalogue) { print ($catalogue[catalogname]); print ($catalogue[id]); print ($catalogue->name[tovname]); print ($catalogue->price[internet]); print ($catalogue->text[tovtext]); } }
Everything works in the English version, but XML
comes in Cyrillic: i.e. I want to know how it will look like:
print (${"каталог"}->{"продукт"}[наименование]);
If in XML
this is:
<каталог идентификатор="10" ... <продукт наименование="Товар 1"/>
Those. How in this variant to accept the data from XML
?