[j-nsp] TEXT->XML, XML examples?

Pekka Savola pekkas at netcore.fi
Mon Nov 6 09:57:39 EST 2006


Hi,

I'm looking for an example (perl?) script that takes a text JunOS 
config and 1) spits it out in XML, and 2) parses the XML for further 
processing.  I've done quite a bit of looking around, but haven't 
found one yet. The examples in 'junoscript-perl-6.4I0' may be able to 
do 2), but I didn't see them do 1).

As a bonus, I'd also like simple examples of scripts that perform some 
configuration checks something like the commit scripts but offline, 
based on text configs.  In the past I've done this using grep, perl 
and friends w/ the text config, but using XML natively might be the 
way to go if doing so is simple enough...

Pointers welcome.

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings


More information about the juniper-nsp mailing list