I
I
Ingvar Von Bjork2016-08-29 22:36:12
PHP
Ingvar Von Bjork, 2016-08-29 22:36:12

How to change the child elements of an xml tag with a specific attribute value?

Let's put it this way: there is an xml file in which the following is written:

<main id="0">
    <name>Имя1</name>
    <fam>Фамилия1</fam>
</main>
<main id="1">
    <name>Имя2</name>
    <fam>Фамилия2</fam>
</main>

It is required to change the values ​​of only those tags whose id is equal to 1. Question: how to access child tags with a certain attribute value?
I use System.Xml

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad Zhivotnev, 2016-06-20
@inkvizitor68sl

https://tech.yandex.ru/tomita/ you can start watching from here.

T
tex0, 2016-08-29
@tex0

Through XPath

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question