Re: [SR-Users] xmlops & XPath question

2014-05-04 Thread Alex Balashov
On 05/03/2014 04:31 AM, Daniel-Constantin Mierla wrote: modparam("xmlops", "xml_ns", "di=urn:ietf:params:xml:ns:dialog-info") $xml(u=>xpath:/di:dialog-info/di:dialog[1]/di:state/text()) This worked, by the way. Thank you! -- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon

Re: [SR-Users] xmlops & XPath question

2014-05-03 Thread Daniel-Constantin Mierla
On 03/05/14 10:33, Alex Balashov wrote: 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 d

Re: [SR-Users] xmlops & XPath question

2014-05-03 Thread Alex Balashov
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 th

Re: [SR-Users] xmlops & XPath question

2014-05-03 Thread Daniel-Constantin Mierla
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 bre

Re: [SR-Users] xmlops & XPath question

2014-05-03 Thread Alex Balashov
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

[SR-Users] xmlops & XPath question

2014-05-03 Thread Alex Balashov
Hello, I don't know a lot about XML or XPath, so I was hoping someone could help me out. I'm trying to parse out 'Event: dialog' state notifications from NOTIFYs using xmlops. They look like this: state="full" entity="sip:abalashov-roam...@xxx.xxx.xxx.xxx"> terminated So, I do: $x