E
E
Evgeny Oleinikov2019-12-17 20:44:22
PHP
Evgeny Oleinikov, 2019-12-17 20:44:22

Parsing xml with unknown structure and nesting level?

Good afternoon!
There are large xml documents into which lists of VMs from virtualization are uploaded, since the VMs are located in different folders and different clusters, the files have a structure with different levels of nesting, the element can be either at level 2 or at 10. Using php, you need to pull out from the tag value file and their descendants , . The tag itself can be at any level.
Can you tell me how this can be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2019-12-17
@firedragon

1 read the tag - parse if virtual, then parse the block, if not, go deeper

Y
Yuri Paimurzin, 2020-01-16
@rusellsystems

you can find patterns using regular expressions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question