Y
Y
Yuri Voronin2019-06-19 17:50:14
PHP
Yuri Voronin, 2019-06-19 17:50:14

How to use Cyrillic when creating XML?

I create xml file

$xml_out = new SimpleXMLElement('<xml/>');
$catalog = $xml_out->addChild('Catalog');
$xml = $catalog ->addChild('Category');
$xml->addAttribute("title", $arParent["NAME"]);
.....
$xml_out -> saveXML('property.xml');

$arParent["NAME"] - contains Cyrillic.
And in the output file, this text looks like this:
&#x41F;&#x440;&#x438;&#x441;&#x442;&#x430;&#x432;&#x43A;&#x438;

Is it possible to make the Cyrillic alphabet normally displayed in the xml file?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2019-06-19
@yuraSco

The first link in Google:
https://copist.ru/ru/blog/2014/03/04/simplexml-and...

A
Andy_U, 2017-08-11
@Romanidze

If you make pix a 3-dimensional numpy array, then instead of computing the 3x3 matrix component by component, you can use slices and get something like:

rgb = np.zeros(3)

for i in range(1, width - 1):
    for j in range(1, height - 1):
        for k in range(3):
            current_matrix = pix[i-1:i+2, j-1:j+2, k]
            rgb[k] = draw_effects_functions.change_color_effects(l, current_matrix, matrix_type_dict)

        draw.point((i, j), rgb)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question