3 # Save the jabber config file, with verification
5 require './jabber-lib.pl';
7 &error_setup($text{'file_err'});
9 # Write to a temp file and check it
11 $in{'file'} =~ s/\r//g;
13 print TEMP $in{'file'};
15 local $xml = new XML::Parser('Style' => 'Tree');
16 eval { $xml->parsefile($temp); };
20 $err =~ s/\s+at\s+(\S+)\s+line\s+(\d+)$//;
24 # Write to the real file
25 &open_tempfile(FILE, ">$config{'jabber_config'}");
26 &print_tempfile(FILE, $in{'file'});
27 &close_tempfile(FILE);