1

Topic: Conversion from XML in XML

Kind time of days.
C XSLT did not work, but other adequate method to change the structure of file XML did not find.
The source file

<? xml version = "1.0" encoding = "windows-1251"?>
<packet>
<version> 2.1 </version>
<date> 27.03.2014 </date>
<omsExpert>
<tf_okato> 90000 </tf_okato>
<n_expert> 0500001 </n_expert>
<fam> Ivanov </fam>
<im> Ivan </im>
<ot> Ivanovich </ot>
<SNILS> 324-545-167 45 </SNILS>
<phone> 84950468129 </phone>
<e_mail> sadasd@mail.ru </e_mail>
<organ_name> the Organization </organ_name>
<dolgnost> the Chief </dolgnost>
<stazh> 34 </stazh>
<expInclude>
<Date_b> 05.04.2011 </Date_b>
<organ_cod> 6 </organ_cod>
</expInclude>
<expDoc>
<docSertificate>
<spec_names> 8 </spec_names>
<date_k> 12.10.2019 </date_k>
</docSertificate>
<docSertificate>
<spec_names> 18 </spec_names>
<date_k> 17.11.2017 </date_k>
</docSertificate>
<docCategory>
<name_kat> 1 </name_kat>
</docCategory>
<docScDiplom>
<name_step> 1 </name_step>
</docScDiplom>
</expDoc>
<date_red> 05.12.2012 </date_red>
</omsExpert>
<omsExpert>
<tf_okato> 90000 </tf_okato>
<n_expert> 0500002 </n_expert>
<fam> Petrov </fam>
<im> Peter </im>
<ot> Petrovich </ot>
<SNILS> 566-567-708 02 </SNILS>
<phone> 89812934345 </phone>
<e_mail> mail2@mail.ru </e_mail>
<organ_name> Chair of eye illnesses </organ_name>
<dolgnost> the Manager. Course </dolgnost>
<stazh> 15 </stazh>
<expInclude>
<Date_b> 08.07.2011 </Date_b>
<organ_cod> 7 </organ_cod>
</expInclude>
<expDoc>
<docSertificate>
<spec_names> 20 </spec_names>
<date_k> 21.04.2017 </date_k>
</docSertificate>
<docCategory>
<name_kat> 1 </name_kat>
</docCategory>
<docScDiplom>
<name_step> 2 </name_step>
</docScDiplom>
</expDoc>
<date_red> 09.03.2017 </date_red>
</omsExpert>
</packet>

It is necessary tags <organ_name> <dolgnost> <stazh> to transfer to each of units <docSertificate>
Tag <name_kat> to transfer also to the unit <docSertificate> , a tag <docCategory> to delete
The result should turn out following

<? xml version = "1.0" encoding = "windows-1251"?>
<packet>
<version> 2.1 </version>
<date> 27.03.2014 </date>
<omsExpert>
<tf_okato> 90000 </tf_okato>
<n_expert> 0500001 </n_expert>
<fam> Ivanov </fam>
<im> Ivan </im>
<ot> Ivanovich </ot>
<SNILS> 324-545-167 45 </SNILS>
<phone> 84950468129 </phone>
<e_mail> sadasd@mail.ru </e_mail>
<expInclude>
<Date_b> 05.04.2011 </Date_b>
<organ_cod> 6 </organ_cod>
</expInclude>
<expDoc>
<docSertificate>
<spec_names> 8 </spec_names>
<date_k> 12.10.2019 </date_k>
<organ_name> the Organization </organ_name>
<dolgnost> the Chief </dolgnost>
<stazh> 34 </stazh>
<name_kat> 1 </name_kat>
</docSertificate>
<docSertificate>
<spec_names> 18 </spec_names>
<date_k> 17.11.2017 </date_k>
<organ_name> the Organization </organ_name>
<dolgnost> the Chief </dolgnost>
<stazh> 34 </stazh>
<name_kat> 1 </name_kat>
</docSertificate>
<docScDiplom>
<name_step> 1 </name_step>
</docScDiplom>
</expDoc>
<date_red> 05.12.2012 </date_red>
</omsExpert>
<omsExpert>
<tf_okato> 90000 </tf_okato>
<n_expert> 0500002 </n_expert>
<fam> Petrov </fam>
<im> Peter </im>
<ot> Petrovich </ot>
<SNILS> 566-567-708 02 </SNILS>
<phone> 89812934345 </phone>
<e_mail> mail2@mail.ru </e_mail>
<expInclude>
<Date_b> 08.07.2011 </Date_b>
<organ_cod> 7 </organ_cod>
</expInclude>
<expDoc>
<docSertificate>
<spec_names> 20 </spec_names>
<date_k> 21.04.2017 </date_k>
<organ_name> Chair of eye illnesses </organ_name>
<dolgnost> the Manager. Course </dolgnost>
<stazh> 15 </stazh>
<name_kat> 1 </name_kat>
</docSertificate>
<docScDiplom>
<name_step> 2 </name_step>
</docScDiplom>
</expDoc>
<date_red> 09.03.2017 </date_red>
</omsExpert>
</packet>

Tried to make itself though any conversion of structure of file XML, but unsuccessfully in IE the data without tags is displayed, or generally is displayed nothing...
If there is no time to understand with it throw off at least idle time  structure XML conversions.
Thanks.

2

Re: Conversion from XML in XML

05 wrote:

in IE the data without tags is displayed, or generally is displayed nothing...

IE displays only html. Since you do conversion in XML in the browser you do not see result. Any exterior tool is necessary to you

3

Re: Conversion from XML in XML

_Vasilisk _;
Can advise any?

4

Re: Conversion from XML in XML

Here it is a lot of.
I use a hand-written script, type such