I'm trying to fetch a remote XML file with Mechanize to get icecast status information. But I'm having problems to pass the XML file from Mechanize::File format to string or some XML format which XMLSimple can work with.
The XML document looks like…
I'm doing something wrong when parsing XML.
Somehow I has to iterate two loops, where only one should be needed. What am I doing wrong here?
First the xml data:
I was wondering if you could shed some lights regarding the code I've been doing for a couple of days.
I've been trying to convert a Perl-parsed hash back to XML using the XMLout() and XMLin() method and it has been quite successful with this…
I am parsing xml files in Perl and everything seems to work great with one issue. I have files with the same schema, but they are returning different types of data from the parser. Here is a simplified example:
…
I am using the following script:
#!/usr/local/bin/perl -wT
use strict;
use warnings;
print "Content-type: text/html\n\n";
print "xml reader";
# use module
use XML::Simple;
use Data::Dumper;
#print Dumper (XML::Simple->new()->XMLin());
and it…
I actually asked this question in a different form before. I did get a great answer but I thought I needed more clarifications, so I am asking it in its whole form again.
The user would script something like:
$ABC->Command(100, 100);
my $group =…
Perl newbie here. Can someone kindly show me how to use perl to extract data from this xml file and format the output anyway i would need? Would I use XML::Simple or open this as a fh and split it somehow? thank you.
Documentation for using…
I have an xml-file I want to parse:
û
It's perfectly parsed by firefox. But XML::Simple corrupts some data. I have a perl-program like this:
my $content = "
I'm trying to use the XmlSimple gem in a script. My script looks like this:
#!/usr/bin/env ruby
gem 'xml-simple', '1.1.5'
xml = XmlSimple.xml_in('test_data.xml')
puts xml
This fails with the error:
./script.rb:5:in `': uninitialized…
I am using the xml-simple gem inside a rake task to parse the contents of a db dump. The problem is that the database xml file contains characters like those in the title that causes xml-simple to crash. Is there a work around to this?
I'm attempting to use the XML::Simple CPAN module to convert output from our database into a simple XML structure. The problem is that the output being returned isn't what I was hoping for no matter what options I attempt to pass to XML::Simple.
The…
I am half way through writing a script using XML::Simple. I have read that is not so "simple", and even its own documentation discourages its use in new code, but I have no other choice as this script will be an extension to existing code.
What I am…
I apologize if I've missed something obvious. I am new to Ruby.
My overall goal is to add functionality to an existing script, which is using rvm and gemsets.
When I install new gems to a particular gemset, the requires in my scripts fail to find…