<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>It doesn't seem that element <span>gml:pos is the root node, so
        the path to it has to contain the parent tags. See the xpath
        specs to understand betther how it has to be constructed.</span></p>
    <p><span>Cheers,<br>
        Daniel<br>
      </span></p>
    <div class="moz-cite-prefix">On 06.04.22 10:14, Artur Hovsepyan
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:960957437.2565063.1649232888037@mail.yahoo.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div class="ydp1158c6ffyahoo-style-wrap"
        style="font-family:Helvetica Neue, Helvetica, Arial,
        sans-serif;font-size:16px;">
        <div dir="ltr" data-setdir="false">
          <div dir="ltr" data-setdir="false">i have managed to escape
            first two lines assuming their length is constant:</div>
          <div dir="ltr" data-setdir="false"><br>
          </div>
          <div dir="ltr" data-setdir="false"><br>
          </div>
          <div dir="ltr" data-setdir="false"><span>$var(pbody) =
              $(var(pbody){s.strip,115});</span></div>
          <div dir="ltr" data-setdir="false">defined the namespaces:<br>
          </div>
          <div dir="ltr" data-setdir="false"><br>
          </div>
          <div dir="ltr" data-setdir="false">
            <div>    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",
              "gs=<a class="moz-txt-link-freetext" href="http://www.opengis.net/pidflo/1.0">http://www.opengis.net/pidflo/1.0</a>")<br>
                  458 modparam("xmlops", "xml_ns",
              "gml=<a class="moz-txt-link-freetext" href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>")<br>
              <br>
            </div>
            <div dir="ltr" data-setdir="false">
              <div>now i am trying to access the namespace "gml" from
                xml document but no luck:</div>
              <div><br>
              </div>
            </div>
            <div><br>
            </div>
            <div dir="ltr" data-setdir="false"><span>593                
                xinfo("GML_LOC: $xml(x=>xpath:/gml:pos)\n");</span><br>
            </div>
          </div>
          <br>
        </div>
        <div dir="ltr" data-setdir="false">trying to get the position
          from XML document:</div>
        <div dir="ltr" data-setdir="false"><br>
        </div>
        <div dir="ltr" data-setdir="false">
          <div><?xml version="1.0"?><br>
            <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 class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a>
            xmlns:gs=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/pidflo/1.0">"http://www.opengis.net/pidflo/1.0"</a>
            xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
            entity=<a class="moz-txt-link-rfc2396E" href="sip:+16478897789@ims.mnc015.mcc302.3gppnetwork.org">"sip:+16478897789@ims.mnc015.mcc302.3gppnetwork.org"</a>><br>
            <dm:device id="Wifi"><br>
            <gp:geopriv><br>
            <gp:location-info><br>
            <gs:Circle srsName="urn:ogc:def:crs:EPSG::5524"><br>
            <b><gml:pos>31.204359 -44.512358</gml:pos></b><br>
            <gs:radius
            uom="urn:ogc:def:uom:EPSG::8190">10.578000</gs:radius><br>
            </gs:Circle><br>
            <con:confidence pdf="normal">92</con:confidence><br>
            </gp:location-info><br>
            <gp:method>DBH_HELO</gp:method><br>
            <gp:usage-rules/><br>
            </gp:geopriv><br>
<dm:timestamp>2022-04-05T19:16:34Z</dm:timestamp><br>
            </dm:device><br>
            </presence></div>
          <div><br>
          </div>
          <div dir="ltr" data-setdir="false">any ideas how to correctly
            define the gml namespace to be able to access the "pos" ?</div>
          <div dir="ltr" data-setdir="false"><br>
          </div>
          <div dir="ltr" data-setdir="false">thanks in advance,<br>
          </div>
          <div><br>
          </div>
        </div>
        <div><br>
        </div>
      </div>
      <div id="ydp8fd7f4byahoo_quoted_9966402018"
        class="ydp8fd7f4byahoo_quoted">
        <div style="font-family:'Helvetica Neue', Helvetica, Arial,
          sans-serif;font-size:13px;color:#26282a;">
          <div> On Wednesday, April 6, 2022, 03:18:32 AM EDT, Artur
            Hovsepyan <a class="moz-txt-link-rfc2396E" href="mailto:hvspa@yahoo.com"><hvspa@yahoo.com></a> wrote: </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>
            <div id="ydp8fd7f4byiv3823052298">
              <div>
                <div style="font-family:Helvetica Neue, Helvetica,
                  Arial, sans-serif;font-size:16px;"
                  class="ydp8fd7f4byiv3823052298ydp9665db9cyahoo-style-wrap">
                  <div>
                    <div dir="ltr">sending third time the same message,
                      if not formatted again, please excuse me and
                      please let me know how to send so the message
                      comes in formatted:</div>
                    <div dir="ltr"><br clear="none">
                    </div>
                    <div dir="ltr">
                      <div><br clear="none">
                        hello everyone,<br clear="none">
                         <br clear="none">
                        i am trying to parse the xml from the message
                        body: get_body_part("application/pidf+xml",
                        "$var(pbody)"); and i am getting the following
                        in my pbody var:<br clear="none">
                         <br clear="none">
                        Content-Disposition: render;handling=optional<br
                          clear="none">
                        Content-ID:
                        <a class="moz-txt-link-rfc2396E" href="sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org"><sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org></a><br
                          clear="none">
                        <?xml version="1.0"?><br clear="none">
                        <presence
                        xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
                        xmlns:gp="urn:ietf:params:xml:ns:pidf:geopriv10"
                        xmlns:gml=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a>
                        xmlns:gs=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/pidflo/1.0">"http://www.opengis.net/pidflo/1.0"</a>
                        xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
entity=<a class="moz-txt-link-rfc2396E" href="sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org">"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">
                        </presence><br clear="none">
                         <br clear="none">
                         <br clear="none">
                        how can i escape the first two lines in order to
                        get the xml part of the content?<br clear="none">
                         <br clear="none">
                        thanks in advance,<br clear="none">
                        Art<br clear="none">
                        <br clear="none">
                      </div>
                      <div><br clear="none">
                      </div>
                    </div>
                    <br clear="none">
                  </div>
                </div>
                <div id="ydp8fd7f4byiv3823052298yqt13550"
                  class="ydp8fd7f4byiv3823052298yqt9711652384">
                  <div
                    id="ydp8fd7f4byiv3823052298ydpd7f3df7eyahoo_quoted_9619653621"
class="ydp8fd7f4byiv3823052298ydpd7f3df7eyahoo_quoted">
                    <div style="font-family:'Helvetica Neue', Helvetica,
                      Arial, sans-serif;font-size:13px;color:#26282a;">
                      <div> On Wednesday, April 6, 2022, 03:16:51 AM
                        EDT, Artur Hovsepyan <a class="moz-txt-link-rfc2396E" href="mailto:hvspa@yahoo.com"><hvspa@yahoo.com></a>
                        wrote: </div>
                      <div><br clear="none">
                      </div>
                      <div><br clear="none">
                      </div>
                      <div>
                        <div
                          id="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901">
                          <div>
                            <div style="font-family:Helvetica Neue,
                              Helvetica, Arial,
                              sans-serif;font-size:16px;"
class="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydp1f03821ayahoo-style-wrap">
                              <div dir="ltr">
                                <div>
                                  <div>
                                    <div
id="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayiv4472137597">
                                      <div
id="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayiv4472137597yqtfd35408"
class="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayiv4472137597yqt3323631808">
                                        <div>
                                          <div dir="ltr">not sure why my
                                            first post is not formatted,
                                            sending it second time to
                                            make sure if it comes
                                            formatted or not:</div>
                                          <div dir="ltr"><br
                                              clear="none">
                                          </div>
                                          <div>hello everyone,</div>
                                          <div> </div>
                                          <div>i am trying to parse the
                                            xml from the message body: <u>get_body_part("application/pidf+xml",
                                              "$var(pbody)");</u> and i
                                            am getting the following in
                                            my pbody var:</div>
                                          <div>
                                            <div> </div>
                                            <div>
                                              <div>Content-Disposition:
                                                render;handling=optional</div>
                                              <div>Content-ID: <<a
                                                  shape="rect"
                                                  href="mailto:sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org</a>></div>
                                              <div><?xml
                                                version="1.0"?></div>
                                              <div><presence
                                                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"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.opengis.net/gml</a>" xmlns:gs="<a
                                                  shape="rect"
                                                  href="http://www.opengis.net/pidflo/1.0"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.opengis.net/pidflo/1.0</a>"
                                                xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
                                                entity="<a shape="rect"
href="mailto:sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org</a>"></div>
                                              <div><dm:device
                                                id="Wifi"></div>
                                              <div><gp:geopriv></div>
                                              <div><gp:location-info></div>
                                              <div><gs:Circle
                                                srsName="urn:ogc:def:crs:EPSG::5524"></div>
                                              <div><gml:pos>31.204359
-44.512358</gml:pos></div>
                                              <div><gs:radius
                                                uom="urn:ogc:def:uom:EPSG::8190">10.578000</gs:radius></div>
                                              <div></gs:Circle></div>
                                              <div><con:confidence
                                                pdf="normal">92</con:confidence></div>
                                              <div></gp:location-info></div>
                                              <div><gp:method>DBH_HELO</gp:method></div>
                                              <div><gp:usage-rules/></div>
                                              <div></gp:geopriv></div>
                                              <div><dm:timestamp>2022-04-05T19:16:34Z</dm:timestamp></div>
                                              <div></dm:device></div>
                                              <div></presence></div>
                                            </div>
                                          </div>
                                          <div> </div>
                                          <div> </div>
                                          <div>how can i escape the
                                            first two lines in order to
                                            get the xml part of the
                                            content?</div>
                                          <div> </div>
                                          <div>thanks in advance,</div>
                                          <div>Art</div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                                <div><br clear="none">
                                </div>
                              </div>
                              <div><br clear="none">
                              </div>
                              <div><br clear="none">
                              </div>
                            </div>
                            <div
                              id="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901yqt89421"
class="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901yqt0851831592">
                              <div
id="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayahoo_quoted_9820153453"
class="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayahoo_quoted">
                                <div style="font-family:'Helvetica
                                  Neue', Helvetica, Arial,
                                  sans-serif;font-size:13px;color:#26282a;">
                                  <div> On Wednesday, April 6, 2022,
                                    03:07:34 AM EDT, Artur Hovsepyan
                                    <a class="moz-txt-link-rfc2396E" href="mailto:hvspa@yahoo.com"><hvspa@yahoo.com></a> wrote: </div>
                                  <div><br clear="none">
                                  </div>
                                  <div><br clear="none">
                                  </div>
                                  <div>
                                    <div
id="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayiv4472137597">
                                      <div
id="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayiv4472137597yqtfd35408"
class="ydp8fd7f4byiv3823052298ydpd7f3df7eyiv5749716901ydpe5f4354ayiv4472137597yqt3323631808">
                                        <div>
                                          <div>hello everyone,</div>
                                          <div> </div>
                                          <div>i am trying to parse the
                                            xml from the message body: <u>get_body_part("application/pidf+xml",
                                              "$var(pbody)");</u> and i
                                            am getting the following in
                                            my pbody var:</div>
                                          <div>
                                            <div> </div>
                                            <div>
                                              <div>Content-Disposition:
                                                render;handling=optional</div>
                                              <div>Content-ID: <<a
                                                  shape="rect"
                                                  href="mailto:sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org</a>></div>
                                              <div><?xml
                                                version="1.0"?></div>
                                              <div><presence
                                                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"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.opengis.net/gml</a>" xmlns:gs="<a
                                                  shape="rect"
                                                  href="http://www.opengis.net/pidflo/1.0"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.opengis.net/pidflo/1.0</a>"
                                                xmlns:con="urn:ietf:params:xml:ns:geopriv:conf"
                                                entity="<a shape="rect"
href="mailto:sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org"
                                                  rel="nofollow"
                                                  target="_blank"
                                                  moz-do-not-send="true"
class="moz-txt-link-freetext">sip:+6478897789@ims.mnc0xx.mccxxx.3gppnetwork.org</a>"></div>
                                              <div><dm:device
                                                id="Wifi"></div>
                                              <div><gp:geopriv></div>
                                              <div><gp:location-info></div>
                                              <div><gs:Circle
                                                srsName="urn:ogc:def:crs:EPSG::5524"></div>
                                              <div><gml:pos>31.204359
-44.512358</gml:pos></div>
                                              <div><gs:radius
                                                uom="urn:ogc:def:uom:EPSG::8190">10.578000</gs:radius></div>
                                              <div></gs:Circle></div>
                                              <div><con:confidence
                                                pdf="normal">92</con:confidence></div>
                                              <div></gp:location-info></div>
                                              <div><gp:method>DBH_HELO</gp:method></div>
                                              <div><gp:usage-rules/></div>
                                              <div></gp:geopriv></div>
                                              <div><dm:timestamp>2022-04-05T19:16:34Z</dm:timestamp></div>
                                              <div></dm:device></div>
                                              <div></presence></div>
                                            </div>
                                          </div>
                                          <div> </div>
                                          <div> </div>
                                          <div>how can i escape the
                                            first two lines in order to
                                            get the xml part of the
                                            content?</div>
                                          <div> </div>
                                          <div>thanks in advance,</div>
                                          <div>Art</div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * <a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">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 class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - Online
  * <a class="moz-txt-link-freetext" href="https://www.asipto.com/sw/kamailio-advanced-training-online/">https://www.asipto.com/sw/kamailio-advanced-training-online/</a></pre>
  </body>
</html>