- simplexml_load_string: documentation ( source)
<?php
$xml=simplexml_load_string(<<<XML
<Server>
<Host>74.208.165.122</Host>
<Port>21</Port>
<Protocol>0</Protocol>
<Type>0</Type>
<Logontype>1</Logontype>
<User>u52405838</User>
<Pass>ebrandz1</Pass>
<TimezoneOffset>0</TimezoneOffset>
<PasvMode>MODE_DEFAULT</PasvMode>
<MaximumMultipleConnections>0</MaximumMultipleConnections>
<EncodingType>Auto</EncodingType>
<Comments></Comments>
<LocalDir></LocalDir>
<RemoteDir></RemoteDir>Zukara.com
</Server>
</Servers>
XML
);
foreach($xml->xpath('//product[starts-with(Host/text(),"Shirt")]') as $product)
{
echo $product->Host;
echo "\n";
echo $product->User;
echo "\n";
echo $product->Pass;
echo "\n<br>";
}