<div dir="ltr">On Mon, Nov 23, 2015 at 10:34 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I plan to add the function to get a content of a
    multipart body, that will make it work then with xmlops module for
    this particular case.</blockquote><div> </div><div>Thank you Daniel, the "get" function from textops worked for me with a small index change for the end buff when mode == 1, for get_body_part_helper() function (I'll do a pull request for the changes).<br><br>I've tried with the attached message file using sipsak and the following config additions:<br><br>...<br>modparam("xmlops", "xml_ns", "pos=pos-namespace")<br>...<br>        if (is_present_hf("Geolocation") &&<br>            is_present_hf("Geolocation-Routing") &&<br>            $hdr(Geolocation-Routing)=~"yes" &&<br>            has_body("multipart/mixed"))<br>        {<br>                get_body_part("application/pidf+xml", "$var(geobody)");<br>                xlog("geobody is $var(geobody)\n");<br><br>                $xml(posxml=>doc)=$var(geobody);<br>                $var(posX)=$xml(posxml=>xpath:/pos:position/pos:x/text());<br>                $var(posY)=$xml(posxml=>xpath:/pos:position/pos:y/text());<br><br>                $var(posX)=$(var(posX){s.trim}{<a href="http://s.int">s.int</a>});<br>                $var(posY)=$(var(posY){s.trim}{<a href="http://s.int">s.int</a>});<br><br>                xlog("LOCATION X IS: $var(posX)\n");<br>                xlog("LOCATION Y IS: $var(posY)\n");<br>        }<br>...<br><br></div><div>Regards,<br></div><div>Stefan<br></div></div></div></div>