Update of /cvsroot/perl-xml/xml-simple/lib/XML
In directory sc8-pr-cvs1:/tmp/cvs-serv27849/lib/XML
Modified Files:
Simple.pm
Log Message:
- POD updates (documented suppressempty for XMLout)
Index: Simple.pm
===================================================================
RCS file: /cvsroot/perl-xml/xml-simple/lib/XML/Simple.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Simple.pm 17 Oct 2002 08:56:18 -0000 1.4
+++ Simple.pm 8 Dec 2002 02:35:05 -0000 1.5
@@ -24,11 +24,13 @@
my $xml = $xs->XMLout($hashref [, <options>]);
-Or to catch common errors:
+(or see L<"SAX SUPPORT"> for 'the SAX way').
+
+To catch common errors:
use XML::Simple qw(:strict);
-(or see L<"SAX SUPPORT"> for 'the SAX way').
+(see L<"STRICT MODE"> for more details).
=cut
@@ -1951,7 +1953,7 @@
will contain only the directory in which the script itself is located.
Otherwise the default searchpath will be empty.
-=item suppressempty => 1 | '' | undef (B<in>) (B<handy>)
+=item suppressempty => 1 | '' | undef (B<in> + B<out>) (B<handy>)
This option controls what C<XMLin()> should do with empty elements (no
attributes and no content). The default behaviour is to represent them as
@@ -1960,6 +1962,10 @@
string will cause empty elements to be represented as the undefined value or
the empty string respectively. The latter two alternatives are a little
easier to test for in your code than a hash with no keys.
+
+The option also controls what C<XMLout()> does with undefined values.
+Setting the option to undef causes undefined values to be output as
+empty elements (rather than empty attributes).
=item xmldecl => 1 or xmldecl => 'string' (B<out>) (B<handy>)
|