Subject: | Root object header attribute lost after a $::xmlDocNew->toString() |
Date: | Fri, 18 Jul 2008 23:49:15 -0400 |
To: | bug-XML-Mini [...] rt.cpan.org |
From: | Daniel Melnechuk <isis [...] isisdesign.com> |
Dear Patrick,
Thank you for your work on XML::Mini. I have been using it for 3
years. Thought i should share the apparent bug i have found after
moving to version 1.38 which i downloaded and installed today on Mac
OS X 10.5.4 leopard. Previously i was using 1.28.
The anomaly is as follows. After i do the following in my perl script
to write out the XML to a file:
(print $::filehandleOne $::xmlDocNew->toString() )
then when i do it a second time to a different file:
(print $::filehandleTwo $::xmlDocNew->toString() )
the xml header line is missing the attribute:
version="1.0"
So, the first file i write the object to has the xml header tag as:
<?xml version="1.0"?>
but the second file i write the object to is written as:
<?xml?>
When i add the following code:
$::xmlHeader->attribute('version', '1.0');
before writing the second file, the attribute is correctly written to
the second file.
That is about it. If you need more info or whatever, please let me
know. I would love to help.
Peace,
Dan
PS: Here is the basic info about my environment.
perdoc perllocal
Fri Jul 18 13:09:41 2008: "Module" XML::Mini
· "installed into: /Library/Perl/5.8.8"
· "LINKTYPE: dynamic"
· "VERSION: 1.38"
· "EXE_FILES: "
uname -a
Darwin Kernel Version 9.4.0: Mon Jun 9 19:30:53 PDT 2008;
root:xnu-1228.5.20~1/RELEASE_I386 i386
perl -v
This is perl, v5.8.8 built for darwin-thread-multi-2level
(with 1 registered patch, see perl -V for more detail)