How to parse xml?

Hello!
Guys, tell me how correctly to steam an xml document using php?
Just starting out and can't find a good example.
I would like to understand in practice.
Here is my document defaultVar.xml
<?xml version = "1.0" encoding = "UTF-8"?>
<repository xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://www.tibco.com/xmlns/repo/types/2002">
<globalVariables>
<globalVariable>
<name>Host</name>
<value>10.64.13.131:1576</value>
<deploymentSettable>true</deploymentSettable>
<serviceSettable>false</serviceSettable>
<type>String</type>
<modTime>1559628965605</modTime>
</globalVariable>
<globalVariable>
<name>MaxConnections</name>
<value>10</value>
<deploymentSettable>true</deploymentSettable>
<serviceSettable>false</serviceSettable>
<type>Integer</type>
<modTime>1559628965605</modTime>
</globalVariable>
<globalVariable>
<name>SID</name>
<value>taffy</value>
<deploymentSettable>true</deploymentSettable>
<serviceSettable>false</serviceSettable>
<type>String</type>
<modTime>1559628965605</modTime>
</globalVariable>
</globalVariables>
</repository>


Can someone show how to choose tags SID and Host, regardless of their positions (relatively, now the host of the first tag in the trail. the document can be 10-m).
March 23rd 20 at 19:22
0 answer

Find more questions by tags PHP