Article ID: 4092, created on Mar 24, 2008, last review on May 9, 2014

  • Applies to:
  • Sphera

Symptoms

How to check the validation of hostdir.xml file.

Resolution

This small python script will check the validation of hostdir.xml file.
Usage:
1) Download the file to [sphera_base]/plugins/bin/
2) Run the script:
[sphera_base]/plugins/bin/./Spython check_xml.py [xml_file]
 
If hostdir.xml is valid, it prints OK, otherwise it prints number of problematic line.

Example for problems in XML:
[root@gillinux bin]# ./Spython check_xml.py /usr/local/hostdir/conf/hostdir.xml
:76037:8: not well-formed (invalid token)

VI the hostdir.xml and jump to line number 76037

If you need to edit the xml, please dont forget to Stop SD and backup the file prior any change.

The script can be found in our FTP under:

ftp://service:,nhfv2k2@oldftp.sphera.com/UTILITIES/Linux/validation_of_hostdir_xml_file

5f478287f7e74fe9b07217d8131cd741 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF