I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-09-02 11:15:08-07 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
Posted on 2007-09-02 20:40:17-07 by grantm in response to 6003
Re: Can I get some help?
Direct Responses: 6062 | Write a response
Posted on 2007-09-13 12:48:55-07 by veikoh in response to 6004
Re: Can I get some help?
Thanks Grant for answering me. However, after playing another few days with parameters forcearray and keyattr I still didn't get any results and wrote some lines of string manipulation code within few hours. Also the problem was, that I'm using a shared UNIX hosting somewhere and do not see any error messages at all. So, using strict mode wasn't much helpful. Anyway, got the XMLOut finally to save the file as discovered outfile parameter. But the result was, that only the element I was modifying where stored as empty string and all other elements where deleted. Should it work this way? Veiko
Direct Responses: Write a response