The "simple" libraries for working with XML in Ruby or Perl.
1
vote
2answers
50 views
How to build a hashref with arrays in perl?
I am having trouble building what i think is a hashref (href) in perl with XML::Simple.
I am new to this so not sure how to go about it and i cant find much to build this href with arrays. All the ...
0
votes
2answers
61 views
Parsing a XML file with Perl XMLSimple
I'm trying to parse a XML-like file with the following structure:
Edit:
I tried to omit most of the huge xml file to simplify everything but c/p-ed wrongly. Here's the full file (900kb!) that ...
1
vote
1answer
36 views
XML::Simple - How to fix that the same xml structure results in 2 different Perl data structures, depending on amount of members/syblings?
I am new to XML::Simple (and also not very keen in xml). I want to use it for parsing a simple xml structure that I get as result of an API. I do not have any influence on the xml I get.
When the ...
0
votes
1answer
130 views
How to parse XML with Mechanize and XMLSimple in ruby?
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 ...
0
votes
2answers
45 views
perl, parsing XML using XML::Simple
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:
<fishy>
<fish ...
1
vote
1answer
36 views
The xml attribute “id” seems to be a protected attribute. What config needed to be able to set it?
I am using the perl module XML::Simple to create an XML structure.
Everything works fine except that the string "<tag1 id="5"> ABC </tag1>"
looks like <tag1 name="5"> ABC ...
1
vote
1answer
52 views
forcing single quotes on XMLout()
Is there an easy way to force XMLout() of XML::Simple to use single quotes instead of double quotes for the attributes? I didn't find an according option (or I missed it...).
<Object Alias="12345" ...
3
votes
3answers
640 views
XML::Parser refusing to install
I've been trying to install XML::Simple on Ubuntu 12.10 for the past two hours or so and have officially run out of ideas. It's failing at the XML::Parser.
I've done an
sudo apt-get install expat
...
1
vote
1answer
89 views
Using a : in a variable name in perl
I'm really new to perl and have an issue where I load in XML using XML::Simple and I have the tag names as hash names. I want to get at the hash stored with the name "xsd:schema" but obviously ...
0
votes
0answers
94 views
XmlSimple in ruby script is not building correctly the xml output file when a xml element has single structure
require 'rubygems'
require 'xmlsimple'
xml_contexts = Array.new
Dir["#{ENV['ALGO_TOP']}/active.????????.????"].each do |context|
context_id_ = File.basename(context)
puts %Q< Processing context ...
3
votes
2answers
373 views
printing XML array values
I'm trying to extract a small amount of data from an XML file into a csv file using perl and XML::Simple.
Here is an edited version of the data:
<?xml version="1.0" encoding="UTF-8"?>
...
0
votes
1answer
108 views
Perl XML::Simple write Directory
Hy,
i want to write all files within a directory and all sub-directories to an associative array and create a XML from this aray. here is my code.
use strict;
use warnings;
use File::Find;
use ...
0
votes
0answers
79 views
xmlsimple / picasa on rails error after upgrade to rails 3.2.3
ArgumentError in GraphicsController#index
Could not find <rails.xml> in <script>
Rails.root: /Users/****/*****/rails/*****
Application Trace | Framework Trace | Full Trace
xml-simple ...
1
vote
2answers
96 views
Is it possible to catch die messages that happen inside another perl module?
I have a SOAP client written in Perl using LWP package for the HTTPS transport and XML::Simple for the parsing of the XML payloads. From time to time the call to XMLin fails with a die() and then my ...
2
votes
1answer
271 views
How do I access data in a nested data structure from XML::Simple?
I have to write a Perl script to convert an XML file into a CSV file. I've already written something simple in one context, and need to enhance it for a different dataset, and can't quite figure out ...