On 05/03/2014 04:31 AM, Daniel-Constantin Mierla wrote:
This kind usage of xmlns in an xml doc is a hack done by SIMPLE WG breaking XML standard, because any ns has to use a prefix for each corresponding name. If you search on google, you will fine some discussions on the web (iirc, Inaki was there as well) - libxml2 devs said they don't want to break the xml standard to handle this case, probably they didn't change the mind meanwhile.
Anyhow, set a prefix for the namespace via xml_ns parameter and then use it in xpath
modparam("xmlops", "xml_ns", "di=urn:ietf:params:xml:ns:dialog-info")
$xml(u=>xpath:/di:dialog-info/di:dialog[1]/di:state/text())
Hope i remembered correctly, anyhow it is somewhere in this direction. If not, search on mailing list archive, the situation popped up few times around.
Thanks Daniel. I was heading in this direction, too, before I got lazy and just hacked out the xmlns attribute with {re.subst}. :-)