[aix-pm-cvs] modules/util/Util/XML File.pm,1.1,1.2
Status: Alpha
Brought to you by:
gonter
|
From: Gerhard G. <go...@us...> - 2017-08-02 16:42:10
|
Update of /cvsroot/aix-pm/modules/util/Util/XML In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27503/modules/util/Util/XML Modified Files: File.pm Log Message: refactoring note Index: File.pm =================================================================== RCS file: /cvsroot/aix-pm/modules/util/Util/XML/File.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** File.pm 1 Aug 2017 16:28:41 -0000 1.1 --- File.pm 2 Aug 2017 16:42:07 -0000 1.2 *************** *** 1,3 **** --- 1,5 ---- + # TODO: rename the package! it is very much related to how Aleph works! + package Util::XML::File; *************** *** 38,41 **** --- 40,45 ---- open (FI, '<:utf8', $cache_file); while (<FI>) { $xml .= $_ }; + close (FI); + $xmlref= XMLin($xml, ForceContent => 1, ForceArray => 1); *************** *** 61,65 **** --- 65,72 ---- { print "saving to [$cache_file]\n"; + + # TODO: this is specific to Aleph! $xml=~ s#<session-id>[\w\d]+</session-id>#<session-id>dummy-session-id</session-id>#; + print FO $xml; close (FO); |