Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16788

XPath XML document parsing returns empty string without ":atom" suffix in the xmlns attribute

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Workaround proposed
    • Icon: Minor Minor
    • None
    • 4.4.0
    • Frontend (F)
    • CentOS Linux release 7.7.1908 (Core)
      Zabbix server with MySQL

      Hi, I've been trying to add an item using the XML XPath preprocessing for a VMware ESXi Patch Tracker RSS feed located in https://esxi-patches.v-front.de/atom/ESXi-6.5.0.xml

      The XML document contains the following excerpt:
      <?xml version="1.0" encoding="utf-8" ?>
      <feed xmlns="http://www.w3.org/2005/Atom">

      <title type="text">ESXi 6.5.0 Patch Tracker</title>
      ...
      The bold parameter above is giving empty result for any query. This will not happen if there is additional ":atom" suffix added to the parameter like this:
      <feed xmlns:atom="http://www.w3.org/2005/Atom">
       
      Steps to reproduce: # Add new item of type HTTP agent to a host

      1. Specify Preprocessing step "XML XPath" with parameters, for example /feed/title for the above example.
      2. Click on "Test" to test the XPath preprocessing and fill in the XML document without ":atom" suffix.

      Result:
      The result of the test returns "empty string"

      Expected:
      Should returns "<title type="text">ESXi 6.5.0 Patch Tracker</title>"

            dlamberts Dmitrijs Lamberts
            afardana Angga Reza Fardana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: