#################### SUBLAND ######################
+sub prepare_text {
+ my $t = $_[0];
+ $t = chomp $t;
+ $t = encode_entities($t);
+ $t =~ s/^\s//;
+ $t =~ s/^\n//;
+ $t =~ s/\t//;
+ return $t;
+ }
+
sub del {
my $registerName = $register->findvalue("./\@name");
my $registerId = $register->findvalue("./\@id");
my $registerSize = $register->findvalue("./\@size");
- my $registerDescr = encode_entities($register->findvalue("./description") || "n/a");
+ my $registerDescr = prepare_text($register->findvalue("./description") || "n/a");
my $flistid = $xmlfile."//".$registerName;
my $fieldName = $field->findvalue("./\@name");
my $readOnlyFlag = 0;
my $fieldValue = $field->findvalue("./\@value");
- my $fieldDescr = encode_entities($field->findvalue("./description") || "n/a");
+ my $fieldDescr = prepare_text($field->findvalue("./description") || "n/a");
my $fieldId = $xmlfile."//".$registerName."/".$fieldName;
if ($fieldValue eq "") {
$fieldValue = $field->findvalue("./\@defaultValue");