The lines t.xml = and -- end t.xml are not in the file t.xml; they were meant to show on screen where the file started and ended.
I modified your XML data because XML::Fast does not recognize it as XML with a tag and value, or tag, attribute, and value.
Output:#!/usr/bin/env perl use strict; use warnings; use XML::Fast; use Data::Dumper; my $xml = '<house_number>12</house_number>'; my $xml_hash = xml2hash $xml; print Dumper($xml_hash),$/; $xml = '<house number="12"/>'; $xml_hash = xml2hash $xml; print Dumper($xml_hash),$/; $xml = '<house_number="128"/>'; $xml_hash = xml2hash $xml; print Dumper($xml_hash),$/;
$VAR1 = { 'house_number' => '12' }; $VAR1 = { 'house' => { '-number' => '12' } }; $VAR1 = { 'house_number="128"' => '' };
If you must use the XMLdata as given, i.e. <house_number="128"/> you'll probably end up having to write your own parser.
In reply to Re^3: errors in printing latex template output
by keszler
in thread errors in printing latex template output
by veerubiji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |