- var_dump: documentation ( source)
<?php
$xml =
"<Msg>
<Txn>submitsms
</Txn>
<AccountID>123456789</AccountID>
<Password>barfoo123</Password>
<Message>test message</Message>
<RateCode>1</RateCode>
<Mobiles>
<MobileNo>07123456701</MobileNo>
</Mobiles>
</Msg>";
$doc = new DOMDocument();
$doc->loadXML($xml);
$xpath = new DOMXPath($doc);
var_dump(
$xpath->evaluate("string(//AccountID)"),
$xpath->evaluate("string(//Password)"),
$xpath->evaluate("string(//Message)")
);