Subject: | Invalid tag name is accepted |
While experimenting, I used the following script:
use strict;
use warnings;
use XML::Writer;
my $writer = XML::Writer->new(OUTPUT => 'self', DATA_MODE => 1, DATA_INDENT => 2, );
$writer->xmlDecl('UTF-8');
$writer->startTag('te<xt');
$writer->endTag();
my $xml = $writer->end();
print $xml;
It generated the XML without any complain:
<?xml version="1.0" encoding="UTF-8"?>
<te<xt></te<xt>
Would it make sense to add error checking for element names?