3 #=======================================================================
5 # File ID: e6461d24-5d49-11df-8e5d-90e6ba3022ac
6 # Converts an XML file to Lisp.
7 # Created by Gene Michael Stover (gene at acm.org)
8 # Tweaks by Øyvind A. Holm <sunny@sunbase.org>.
9 #=======================================================================
21 foreach my $i (1 .. $indent) {
27 ### Callback functions.
28 ### "cb" stands for "call back".
39 foreach my $i (0 .. $#attrval) {
41 print " (", $attrval[$i];
43 print ' . "', $attrval[$i], '")';
61 if (length $str > 0) {
72 my $xml = new XML
::Parser
(Handlers
=> {Start
=> \
&cb_start
,
75 if ($xml->parse (join "", <>)) {
77 print "error: XML parsefile failed\n";
81 ### --- end of file ---