Re: [SR-Users] Publish XML and xpath

2022-02-10 Thread Daniel-Constantin Mierla
For sake of correctness, as I tried to figure out again searching the web what the actual issue, the conflict seems to be with XPATH specifications that don't define default xmlns scope, they have NULL scope for no-prefix tags which is not the same as the default xmlns. Not 100% sure, as I didn't w

Re: [SR-Users] Publish XML and xpath

2022-02-10 Thread Igor Olhovskiy
Daniel, Many thanks! Your "replace" solution looks more elegant than just remove the whole string. Regards, Igor Le 10.02.2022 à 16:52, Daniel-Constantin Mierla a écrit : Hello, actually the problem is the mess SIMPLE RFC authors made with XML namespaces, by not setting and not using a p

Re: [SR-Users] Publish XML and xpath

2022-02-10 Thread Igor Olhovskiy
Hello, Seems, there is a need to specify xmlns forcefully As it's working when I do $var(body) = $(rb{s.rm,xmlns="urn:ietf:params:xml:ns:dialog-info"}); So, I do need or to specify namespace or to remove this line from XML. But if someone can comment on this (cause XML is a world on it's own)

Re: [SR-Users] Publish XML and xpath

2022-02-10 Thread Daniel-Constantin Mierla
Hello, actually the problem is the mess SIMPLE RFC authors made with XML namespaces, by not setting and not using a prefix for them, otherwise the #012 is end-of-line printed by syslog as octal character. The solutions: 1) replace "xmlns=" with something else like "xyzwq=": $xml(body=>doc) = $(

Re: [SR-Users] Publish XML and xpath

2022-02-10 Thread Igor Olhovskiy
Hello Just to add, when I'm trying to dump $rb to logs, I'm getting this line #012#012  #012    terminated#012  #012 So, I expect problem is in this #012 + extra spaces. Is there a way to clean it up in an easy way? Regards, Igor Le 10.02.2022 à 16:01, Igor Olhovskiy a écrit : Hello, I'

[SR-Users] Publish XML and xpath

2022-02-10 Thread Igor Olhovskiy
Hello, I'm trying to get state of endpoint from PUBLISH message in a most simple way using xmlops module Trying to make this $xml(body=>doc) = $rb; log("L_ERR", "$rU is now in state $xml(body=>xpath:/dialog-info/dialog/state)\n"); XML in PUBLISH itself       confirmed   Actual text