It's definitely namespace-related, because when I manually hack out the namespace, it works fine!
$var(x) = $rb; $var(x) = $(var(x){re.subst,/xmlns=".+"//});
$xml(u=>doc) = $var(x);
xlog("L_INFO", "State: $xml(u=>xpath:/dialog-info/dialog[1]/state/text())\n");
But I can't for the life of me figure out how to construct an XPath expression that properly captures the urn:ietf:params:xml:ns:dialog-info namespace.