F
F
fulltimeplz2019-04-09 11:07:56
Java
fulltimeplz, 2019-04-09 11:07:56

Autocorrect in xml file?

Good afternoon, I have an xml file in the form

<Users>
    <User>
      <ID>00001</ID>
      <Branch>Головной офис</Branch>
      <ParentDepartmentCode></ParentDepartmentCode>
      <ParentDepartmentName></ParentDepartmentName>
      <DepartmentCode>001</DepartmentCode>
      <DepartmentName>Администрация</DepartmentName>
      <HeadID></HeadID>
      <Head></Head>
      <DeputyManagerID/>
      <DeputyManager/>
      <SnilsHash>1111111111111111111111111111111111111</SnilsHash>
      <LastName>Иванов</LastName>
      <FirstName>Максим</FirstName>
      <MiddleName>Максимович</MiddleName>
      <Post>Генеральный директор</Post>
      <DateOfBirth/>
      <DateOfEmployment>01.03.2009</DateOfEmployment>
      <DateOfDischarge/>
      <LastState>Перемещение</LastState>
      <Period>01.12.2018</Period>
      <LeavePeriodBegin/>
      <LeavePeriodEnd/>
      <LeaveStateName/>
    </User>
</Users?

and needed in the form:
<ri:__ACCOUNT__>
        <icf:__NAME__>12345678-9999-9999-9999-876543210000</icf:__NAME__>
        <icf:__DESCRIPTION__>desc</icf:__DESCRIPTION__>
        <icf:__ENABLE__>true</icf:__ENABLE__>
        <ri:firstname>Пётр</ri:firstname>
        <ri:time/>
        <icf:__UID__>01234567-89ab-cdef-0000-876543210000</icf:__UID__>
        <ri:administrator/>
        <ri:date/>
        <ri:middlename>Петрович</ri:middlename>
        <ri:password>123</ri:password>
        <ri:lastname>Петров</ri:lastname>
        <ri:usertype>Преподаватель</ri:usertype>
        <ri:username>peter_p</ri:username>
        <ri:age/>
    </ri:__ACCOUNT__>

That is, in fact, I need to auto-replace some tags with others, how will it look in the code? Perhaps there are ready-made solutions?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mystifier, 2019-04-09
@mystifier

For example XSL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question