|Perl Monk, Perl Meditation|
Config files To XMLby LiNuXaDDiKt (Initiate)
|on Mar 13, 2009 at 18:32 UTC||Need Help??|
LiNuXaDDiKt has asked for the
wisdom of the Perl Monks concerning the following question:
First of all, I need to mention that my knowledge of XML is very poor...
That said, I'm a Networking IT guy that work with Cisco, Acatel, Juniper and other vendor equipment on a daily basis. I regularly build perl scripts to interract with configuration files of those vendors and I wonder if XML would be of any help regarding this.
Cisco IOS config files don't really have a real structure that is easily convertible to a XML logical structure. Still, I'm giving it a try in case any one have ever did something intelligent with this type of config.
On the other hand, Alcatel and Juniper configs does have a very well structured output that can easily be converted to an XML format (see examples below).
Here are the questions (well for now...) :
- Is there any existing module that can convert Cisco configs to XML?
- Is there existing module that can convert structure similar to Alcatel or Juniper (again see below) to XML?
- If no sutch module exists, how hard would it be to adapt one to recognize this kind of hierarchy?
My goal here is to try see if any benefits could be acheived by using XML to work with config files instead of doing legacy code all the time.
Alcatel TiMOS example
Juniper JUNOS Example