CPAN::Forum
XML-Simple - Can I get some help?
| Posted on Sun Sep 2 14:15:08 2007 by veikoh |
| Can I get some help? |
|
After struggling few days with XML Simple I decided better to ask advice here as the documentation lacks simple examples. I'm started with Perl recently but I have long backgroung in IT programming using several languages. Rather than writing my own string manipulation code, XML Simple sounded good idea to use. The issue is to change the values of previous and next in XML file, both are URL's.
I have XML files with following structure:
<item>
....
<previous>...</previous>
<next>...</next>
</item>
So currently I have written following codelines:
my $btemplate = XMLin ("template_file.xml");
$prev = $btemplate -> {previous};
$btemplate -> {previous} = $link;
XMLout ($btemplate);
my $prevpage = XMLin ($prev);
$prevpage -> {next} = $link;
XMLout ($prevpage);
The problem is, that $prev value is always empty and XMLout does not do anything.
I tried also $btemplate -> {item => previous) but still have the same problem.
Maybe somebody here can help me I my code should look like?
Veiko
|
| Direct Responses: 6004 | Write a response |
(14)
]