<html><head></head><body><div class="ydp5ad071a4yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div dir="ltr" data-setdir="false">it still fails, i have tried handful scenarios, but still failing:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><div>    454 modparam("xmlops", "xml_ns", "rpid=urn:ietf:params:xml:ns:pidf:rpid")<br>    455 modparam("xmlops", "xml_ns", "pidf=urn:ietf:params:xml:ns:pidf")<br>    456 modparam("xmlops", "xml_ns", "gp=urn:ietf:params:xml:ns:pidf:geopriv10")<br>    457 modparam("xmlops", "xml_ns", "dm=urn:ietf:params:xml:ns:pidf:data-model")<br>    458 modparam("xmlops", "xml_ns", "gs=http://www.opengis.net/pidflo/1.0")</div><div><br></div><div><br></div><div dir="ltr" data-setdir="false">with the text() function, i am getting error:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><span>ERROR: <core> [core/pvapi.c:176]: pv_locate_name(): non-closing inner-name parenthesis [$xml(x=>xpath:/pidf:presence/dm:device/gp:geopriv/gp:location-info/gs:Circle/gml:pos/text()]</span></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">without text, i am getting this:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><span>ERROR: xmlops [pv_xml.c:308]: pv_get_xml(): unable to evaluate xpath expression [/pidf:presence/dm:device/gp:geopriv/gp:location-info/gs:Circle/gml:pos/70]</span><br></div></div><div><br></div><div dir="ltr" data-setdir="false">i am still stuck.<br></div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydpa37a9971yahoo_quoted_9938327654" class="ydpa37a9971yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Wednesday, April 6, 2022, 01:43:13 PM EDT, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydpa37a9971yiv7056537409"><div>
    <p>iirc, to get the text between tags, you have to use text()
      function of xpath (should be in the xpath specs) -- I guess you
      have to use:</p>
    <p>$xml(x=>xpath:/pidf:presence/dm:device/gp:geopriv/gp:location-info/gs:Circle/gml:pos/text())</p>
    <p>Cheers,<br clear="none">
      Daniel<br clear="none">
    </p>
    <div id="ydpa37a9971yiv7056537409yqt99695" class="ydpa37a9971yiv7056537409yqt5646011245"><div class="ydpa37a9971yiv7056537409moz-cite-prefix">On 06.04.22 18:13, Artur Hovsepyan
      wrote:<br clear="none">
    </div>
    <blockquote type="cite">
      </blockquote></div></div><div id="ydpa37a9971yiv7056537409yqt19612" class="ydpa37a9971yiv7056537409yqt5646011245"><div><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;" class="ydpa37a9971yiv7056537409yahoo-style-wrap">
        <div dir="ltr">good evening everyone,</div>
        <div dir="ltr"><br clear="none">
        </div>
        <div dir="ltr">can you please help how to
          parse following XML body and get the "<span><gml:pos>31.204359
            -44.512358</gml:pos></span>" in a variable? <br clear="none">
        </div>
        <div dir="ltr"><br clear="none">
        </div>
        <div dir="ltr">
          <div><?xml version="1.0"?><br clear="none">
            <presence xmlns="urn:ietf:params:xml:ns:pidf"
            xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
            xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
            xmlns:gml=<a shape="rect" href="http://www.opengis.net/gml" class="ydpa37a9971yiv7056537409moz-txt-link-rfc2396E" rel="nofollow" target="_blank">"http://www.opengis.net/gml"</a>
            xmlns:gs=<a shape="rect" href="http://www.opengis.net/pidflo/1.0" class="ydpa37a9971yiv7056537409moz-txt-link-rfc2396E" rel="nofollow" target="_blank">"http://www.opengis.net/pidflo/1.0"</a>
            xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
            entity=<a shape="rect" class="ydpa37a9971yiv7056537409moz-txt-link-rfc2396E">"sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org"</a>><br clear="none">
            <dm:device id="Wifi"><br clear="none">
            <gp:geopriv><br clear="none">
            <gp:location-info><br clear="none">
            <gs:Circle srsName="urn:ogc:def:crs:EPSG::5524"><br clear="none">
            <gml:pos>31.204359 -44.512358</gml:pos><br clear="none">
            <gs:radius
            uom="urn:ogc:def:uom:EPSG::8190">10.578000</gs:radius><br clear="none">
            </gs:Circle><br clear="none">
            <con:confidence pdf="normal">92</con:confidence><br clear="none">
            </gp:location-info><br clear="none">
            <gp:method>DBH_HELO</gp:method><br clear="none">
            <gp:usage-rules/><br clear="none">
            </gp:geopriv><br clear="none">
<dm:timestamp>2022-04-05T19:16:34Z</dm:timestamp><br clear="none">
            </dm:device><br clear="none">
            <div></presence></div>
            <div><br clear="none">
            </div>
            <div dir="ltr">i tried few variants:<br clear="none">
            </div>
            <div dir="ltr"><br clear="none">
            </div>
            <div dir="ltr">
              <div>xinfo("GML_LOC:
$xml(x=>xpath:/pidf:presence/pidf:dm:device/pidf:gp:geopriv/pidf:gp:location-info/pidf:gs:Circle/pidf:gml:pos)\n")<br clear="none">
                xinfo("GML_LOC:
$xml(x=>xpath:/pidf:presence/pidf:dm\:device/pidf:gp\:geopriv/pidf:gp\:location-info/pidf:gs\:Circle/pidf:gml\:pos)\n");<br clear="none">
                xinfo("GML_LOC:
$xml(x=>xpath:/pidf:presence/pidf:dm:device/pidf:gp:geopriv/pidf:gp:location-info/pidf:gs:Circle/pidf:gml:pos)\n");<br clear="none">
                xinfo("GML_LOC:
$xml(x=>xpath:/pidf:presence/dm:device/gp:geopriv/gp:location-info/gs:Circle/gml:pos)\n");</div>
              <div><br clear="none">
              </div>
              <div dir="ltr"><span>and end up with
                  error "unable to evaluate xpath expression":</span></div>
              <div dir="ltr"><br clear="none">
              </div>
              <div dir="ltr"><span>ERROR: xmlops
                  [pv_xml.c:308]: pv_get_xml(): unable to evaluate xpath
                  expression
[/pidf:presence/dm:device/gp:geopriv/gp:location-info/gs:Circle/gml:pos/70]</span><br clear="none">
              </div>
            </div>
          </div>
          <div><br clear="none">
          </div>
          <div>thanks in advance,</div>
          <div dir="ltr">Art<br clear="none">
          </div>
        </div>
      </div>
      <br clear="none">
      <fieldset class="ydpa37a9971yiv7056537409moz-mime-attachment-header"></fieldset>
      <pre class="ydpa37a9971yiv7056537409moz-quote-pre">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a shape="rect" href="mailto:sr-users@lists.kamailio.org" class="ydpa37a9971yiv7056537409moz-txt-link-abbreviated" rel="nofollow" target="_blank">sr-users@lists.kamailio.org</a>
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * <a shape="rect" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" class="ydpa37a9971yiv7056537409moz-txt-link-freetext" rel="nofollow" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    
    <pre class="ydpa37a9971yiv7056537409moz-signature">-- 
Daniel-Constantin Mierla -- <a shape="rect" href="http://www.asipto.com" class="ydpa37a9971yiv7056537409moz-txt-link-abbreviated" rel="nofollow" target="_blank">www.asipto.com</a>
<a shape="rect" href="http://www.twitter.com/miconda" class="ydpa37a9971yiv7056537409moz-txt-link-abbreviated" rel="nofollow" target="_blank">www.twitter.com/miconda</a> -- <a shape="rect" href="http://www.linkedin.com/in/miconda" class="ydpa37a9971yiv7056537409moz-txt-link-abbreviated" rel="nofollow" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
  * <a shape="rect" href="https://www.asipto.com/sw/kamailio-advanced-training-online/" class="ydpa37a9971yiv7056537409moz-txt-link-freetext" rel="nofollow" target="_blank">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </div></div></div></div>
            </div>
        </div></body></html>