3 Replies Latest reply on Sep 21, 2018 11:21 AM by M Prasad-Oracle

    How to extract particular values from xml?

    M Prasad-Oracle

      Hi,


      I am new to xml-rpc and there are various formats of responses . I have parsed some of them refering previous help given by mNem and Carmaco.

      Below found quite difficult. I am trying to use path and name tag, however not getting required result.
      Please provide some info , so that i can achieve it.

       

       

       

       

      Out Put required:

      Name                                                                               Result

      Checking if exists: /usr/local/dbfw/etc/stund.conf                   OK

       

      Checking if exists: /etc/platform.conf                               OK

       

      Checking if exists: /usr/local/dbfw/etc/dbfw.conf                    OK

       

      Checking if readable by user dbfw: /etc/platform.conf                OK

       

      Checking if readable by user dbfw: /usr/local/dbfw/etc/dbfw.conf      OK
      ........

       

      ...........

      ...........

       

       

      XML is as below:

      <methodResponse>

          <params>

              <param>

                  <value>

                      <struct>

                          <member>

                              <name>report</name>

                              <value>

                                  <array>

                                      <data>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>exists_usr_local_dbfw_etc_stund_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if exists: /usr/local/dbfw/etc/stund.conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>exists_etc_platform_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if exists: /etc/platform.conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>exists_usr_local_dbfw_etc_dbfw_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if exists: /usr/local/dbfw/etc/dbfw.conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>readable_by_user_dbfw_etc_platform_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if readable by user dbfw: /etc/platform.conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>readable_by_user_dbfw_usr_local_dbfw_etc_dbfw_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if readable by user dbfw: /usr/local/dbfw/etc/dbfw.conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>unknown_keys_in_usr_local_dbfw_etc_dbfw_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking for unknown keys in /usr/local/dbfw/etc/dbfw.conf: []</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>missing_keys_in_usr_local_dbfw_etc_dbfw_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking for missing keys in /usr/local/dbfw/etc/dbfw.conf: []</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>ca_date</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking CA date</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>internal_certificate_date</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking internal certificate date</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>internal_certificate_hostname</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking internal certificate hostname</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>internal_certificate_alternative_names</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking internal certificate alternative names</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>ui_certificates_date</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking UI certificates date</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>ui_certificate_hostname</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking UI certificate hostname</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>ui_certificate_alternative_names</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking UI certificate alternative names</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>writable_by_user_dbfw_usr_local_dbfw_etc_dbfw_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if writable by user dbfw: /usr/local/dbfw/etc/dbfw.conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>writable_by_user_dbfw_usr_local_dbfw_upload</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if writable by user dbfw: /usr/local/dbfw/upload</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_ol6root_mounted_on_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_ol6root mounted on / (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_tmp_mounted_on_tmp_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_tmp mounted on /tmp (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_home_mounted_on_home_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_home mounted on /home (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_local_dbfw_mounted_on_usr_local_dbfw_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_local_dbfw mounted on /usr/local/dbfw (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_local_dbfw_tmp_mounted_on_usr_local_dbfw_tmp_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_local_dbfw_tmp mounted on /usr/local/dbfw/tmp (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_var_log_mounted_on_var_log_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_var_log mounted on /var/log (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_var_tmp_mounted_on_var_tmp_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_var_tmp mounted on /var/tmp (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_var_dbfw_mounted_on_var_dbfw_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_var_dbfw mounted on /var/dbfw (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dev_mapper_vg_root_lv_opt_dbfw_mounted_on_opt_dbfw_ext4</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /dev/mapper/vg_root-lv_opt_dbfw mounted on /opt/dbfw (ext4)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>tmpfs_mounted_on_usr_local_dbfw_volatile_tmpfs</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if tmpfs mounted on /usr/local/dbfw/volatile (tmpfs)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>tmpfs_mounted_on_dev_shm_tmpfs</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if tmpfs mounted on /dev/shm (tmpfs)</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>network_address</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking network address</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>network_mask</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking network mask</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>dns</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking DNS</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>gateway</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking gateway</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>http_server_is_running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if HTTP server is running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>cron_is_running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if cron is running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>that_ipv6_is_disabled</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking that IPv6 is disabled</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>netfilter_rules</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking netfilter rules</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>migration_status</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking Migration Status</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>bridges</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking bridges</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>controller_connection</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking controller connection</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>exists_usr_local_dbfw_etc_privkey_pem</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if exists: /usr/local/dbfw/etc/privkey.pem</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>exists_usr_local_dbfw_etc_cert_crt</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if exists: /usr/local/dbfw/etc/cert.crt</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>readable_by_user_dbfw_usr_local_dbfw_etc_privkey_pem</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if readable by user dbfw: /usr/local/dbfw/etc/privkey.pem</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>readable_by_user_dbfw_usr_local_dbfw_etc_cert_crt</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if readable by user dbfw: /usr/local/dbfw/etc/cert.crt</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>usr_local_dbfw_etc_cert_crt_certificate_is_already_valid</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /usr/local/dbfw/etc/cert.crt certificate is already valid</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>usr_local_dbfw_etc_cert_crt_certificate_is_valid_at_least_for_one_year</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if /usr/local/dbfw/etc/cert.crt certificate is valid at least for one year</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>readable_by_user_dbfw_usr_local_dbfw_etc_stund_conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if readable by user dbfw: /usr/local/dbfw/etc/stund.conf</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>stund_is_running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if stund is running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>monitor_is_running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking if monitor is running</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>unexpected_policy_file</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking unexpected policy file</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>unexpected_va_directory_entries</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking unexpected VA directory entries</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>monitoring_processes</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking monitoring processes</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>conflicting_enforcement_point_configuration</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking for conflicting enforcement point configuration</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>redundant_enforcement_point_configuration</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking for redundant enforcement point configuration</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                          <value>

                                              <struct>

                                                  <member>

                                                      <name>id</name>

                                                      <value>

                                                          <string>enforcement_points</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>name</name>

                                                      <value>

                                                          <string>Checking enforcement points</string>

                                                      </value>

                                                  </member>

                                                  <member>

                                                      <name>result</name>

                                                      <value>

                                                          <string>OK</string>

                                                      </value>

                                                  </member>

                                              </struct>

                                          </value>

                                      </data>

                                  </array>

                              </value>

                          </member>

                          <member>

                              <name>status</name>

                              <value>

                                  <string>ok</string>

                              </value>

                          </member>

                      </struct>

                  </value>

              </param>

          </params>

      </methodResponse>

        • 1. Re: How to extract particular values from xml?
          M Prasad-Oracle

          SELECT x.* FROM  ip_add T, XMLTABLE (  

                                '/methodResponse/params/param/value/struct/member/value/array/data/value'  

                                PASSING a 

                                  COLUMNS

                                   name          VARCHAR2(100) path 'struct/member[name="name"]/value/string',

                                   result          varchar2(100) path 'struct/member[name="result"]/value/string' ) x;

           

          I have written above sql and it looks giving required result.

          • 2. Re: How to extract particular values from xml?
            mNem

            Looks ok to me...

            NAME                                                                                                 RESULT                                                                                             
            ---------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------
            Checking if exists: /usr/local/dbfw/etc/stund.conf                                                   OK                                                                                                  
            Checking if exists: /etc/platform.conf                                                               OK                                                                                                  
            Checking if exists: /usr/local/dbfw/etc/dbfw.conf                                                    OK                                                                                                  
            Checking if readable by user dbfw: /etc/platform.conf                                                OK                                                                                                  
            Checking if readable by user dbfw: /usr/local/dbfw/etc/dbfw.conf                                     OK                                                                                                  
            Checking for unknown keys in /usr/local/dbfw/etc/dbfw.conf: []                                       OK                                                                                                  
            Checking for missing keys in /usr/local/dbfw/etc/dbfw.conf: []                                       OK                                                                                                  
            Checking CA date                                                                                     OK                                                                                                  
            Checking internal certificate date                                                                   OK                                                                                                  
            Checking internal certificate hostname                                                               OK                                                                                                  
            Checking internal certificate alternative names                                                      OK                                                                                                  
            Checking UI certificates date                                                                        OK                                                                                                  
            Checking UI certificate hostname                                                                     OK                                                                                                  
            Checking UI certificate alternative names                                                            OK                                                                                                  
            Checking if writable by user dbfw: /usr/local/dbfw/etc/dbfw.conf                                     OK                                                                                                  
            Checking if writable by user dbfw: /usr/local/dbfw/upload                                            OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_ol6root mounted on / (ext4)                                       OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_tmp mounted on /tmp (ext4)                                        OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_home mounted on /home (ext4)                                      OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_local_dbfw mounted on /usr/local/dbfw (ext4)                      OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_local_dbfw_tmp mounted on /usr/local/dbfw/tmp (ext4)              OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_var_log mounted on /var/log (ext4)                                OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_var_tmp mounted on /var/tmp (ext4)                                OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_var_dbfw mounted on /var/dbfw (ext4)                              OK                                                                                                  
            Checking if /dev/mapper/vg_root-lv_opt_dbfw mounted on /opt/dbfw (ext4)                              OK                                                                                                  
            Checking if tmpfs mounted on /usr/local/dbfw/volatile (tmpfs)                                        OK                                                                                                  
            Checking if tmpfs mounted on /dev/shm (tmpfs)                                                        OK                                                                                                  
            Checking network address                                                                             OK                                                                                                  
            Checking network mask                                                                                OK                                                                                                  
            Checking DNS                                                                                         OK                                                                                                  
            Checking gateway                                                                                     OK                                                                                                  
            Checking if HTTP server is running                                                                   OK                                                                                                  
            Checking if cron is running                                                                          OK                                                                                                  
            Checking that IPv6 is disabled                                                                       OK                                                                                                  
            Checking netfilter rules                                                                             OK                                                                                                  
            Checking Migration Status                                                                            OK                                                                                                  
            Checking bridges                                                                                     OK                                                                                                  
            Checking controller connection                                                                       OK                                                                                                  
            Checking if exists: /usr/local/dbfw/etc/privkey.pem                                                  OK                                                                                                  
            Checking if exists: /usr/local/dbfw/etc/cert.crt                                                     OK                                                                                                  
            Checking if readable by user dbfw: /usr/local/dbfw/etc/privkey.pem                                   OK                                                                                                  
            Checking if readable by user dbfw: /usr/local/dbfw/etc/cert.crt                                      OK                                                                                                  
            Checking if /usr/local/dbfw/etc/cert.crt certificate is already valid                                OK                                                                                                  
            Checking if /usr/local/dbfw/etc/cert.crt certificate is valid at least for one year                  OK                                                                                                  
            Checking if readable by user dbfw: /usr/local/dbfw/etc/stund.conf                                    OK                                                                                                  
            Checking if stund is running                                                                         OK                                                                                                  
            Checking if monitor is running                                                                       OK                                                                                                  
            Checking unexpected policy file                                                                      OK                                                                                                  
            Checking unexpected VA directory entries                                                             OK                                                                                                  
            Checking monitoring processes                                                                        OK                                                                                                  
            Checking for conflicting enforcement point configuration                                             OK                                                                                                  
            Checking for redundant enforcement point configuration                                               OK                                                                                                  
            Checking enforcement points                                                                          OK                                                                                                  
            
             53 rows selected 
            
            1 person found this helpful