Parsing xml with unknown structure and level of nesting?

Good day!
There are large xml documents which are uploaded lists VM with virtualization, because the VM's are in different folders and different clusters, the files have a structure with different levels of nesting, the item can be at 2 and 10. Using php you want to pull from a file the values of the tags and their descendants . Itself the tag may be on any level.
Tell me how this can be accomplished?
April 3rd 20 at 18:25
2 answers
April 3rd 20 at 18:27
1 count tag - parse if the V-world, then parse the block, if not go into
April 3rd 20 at 18:29
you can find patterns and using regular expressions

Find more questions by tags PHPParsingXML