/[webpac2]/trunk/lib/WebPAC/Normalize/XML.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Normalize/XML.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 38 by dpavlin, Sat Nov 12 21:21:50 2005 UTC revision 62 by dpavlin, Tue Nov 15 14:31:12 2005 UTC
# Line 14  WebPAC::Normalize::XML - apply XML norma Line 14  WebPAC::Normalize::XML - apply XML norma
14    
15  =head1 VERSION  =head1 VERSION
16    
17  Version 0.01  Version 0.02
18    
19  =cut  =cut
20    
21  our $VERSION = '0.01';  our $VERSION = '0.02';
22    
23  =head1 SYNOPSIS  =head1 SYNOPSIS
24    
# Line 44  C<tag> defines tag to use within C<xml_f Line 44  C<tag> defines tag to use within C<xml_f
44    
45  C<xml_file> defines path to normalize XML.  C<xml_file> defines path to normalize XML.
46    
47    C<tags> define additional tags that can be forced (and an be array).
48    
49  =cut  =cut
50    
51  sub open {  sub open {
# Line 66  sub open { Line 68  sub open {
68    
69          $self->{'import_xml_file'} = $xml_file;          $self->{'import_xml_file'} = $xml_file;
70    
71            my @force_array = [ $self->{'tag'}, 'config', 'format' ];
72            push @force_array, $self->{'tags'} if ($self->{'tags'});
73    
74          $self->{'import_xml'} = XMLin($xml_file,          $self->{'import_xml'} = XMLin($xml_file,
75                  ForceArray => [ $self->{'tag'}, $self->{'tags'}, 'config', 'format' ],                  ForceArray => @force_array,
76                  ForceContent => 1,                  ForceContent => 1,
77          );          );
78    

Legend:
Removed from v.38  
changed lines
  Added in v.62

  ViewVC Help
Powered by ViewVC 1.1.26