Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: What may be the problem in my code?

by ptum (Priest)
on Jan 06, 2006 at 09:48 UTC ( [id://521487]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to What may be the problem in my code?

Looking at the documentation for XML::Simple it looks to me as though this is a feature, not a bug. It seems that XML::Simple strips off the name-value pairs and returns them without the name of the tag. Taken from the EXAMPLES section of the POD for XML::Simple:

When XMLin() reads the following very simple piece of XML: <opt username="testuser" password="frodo"></opt> it returns the following data structure: { 'username' => 'testuser', 'password' => 'frodo' }

It seems that XML::Simple expects you to use a named variable to hold the contents of the data structure, like this:

use XML::Simple; my $res = XML::Simple->new() my $a_tag = $res->XMLin($text);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://521487]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.