But the problem is that the attribute "name" has to be stored in a variable. So I have to write the second line like this:$data = $xml->XMLin("data.xml"); # access XML data print "$data->{name} is $data->{age} years old.
which is not working properly. I am using xml::simple to parse this file. Thanks for your suggestions.$name=$data->{name}; #reads the content of name print "$data->{$name} is $data->{age} years old.#goes to the value/att +ribute #pointed by $name
In reply to need help with xml parser by nepzraaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |