Questions tagged [xml-simple]

The "simple" libraries for working with XML in Ruby or Perl.

The Perl XML::Simple module or the XmlSimple Ruby gem.

111 questions
1
vote
3 answers

What is wrong with my declaration of a hash inside a hash in Perl?

I am struggling with the following declaration of a hash in Perl: my %xmlStructure = { hostname => $dbHost, username => $dbUsername, password => $dbPassword, dev_table => $dbTable, …
ILikeTacos
  • 17,464
  • 20
  • 58
  • 88
1
vote
2 answers

How do I produce XML with Perl's XML::Simple?

I am just trying to create the XML use XML::Simple; my %element = ( "a" => "10" , "b" => "20" ,); my $xs = new XML::Simple(); my $ref = $xs->XMLin(%element); my $xml = $xs->XMLout($ref); print $xml; What is wrong on this code ? …
joe
  • 34,529
  • 29
  • 100
  • 137
1
vote
1 answer

How do I access deep data in a nested XML structure in Perl using XML::Simple?

I am using XML::Simple and I have the following XML structure in a variable $xmldata which I need to access through Perl code. sfghs agaga sgsfs sgsrsh
john
0
votes
1 answer

XML::Simple, XML nodes turned into value of 'name' nodes

I am using Perl with XML::Simple to convert a hash into an XML document. My script looks as follows: #!/usr/bin/perl use strict; use warnings; use XML::Simple; use Data::Dumper; my $xml_simple = XML::Simple->new( NoAttr => 1, …
Mauritz Hansen
  • 4,674
  • 3
  • 29
  • 34
0
votes
1 answer

XML::Simple and unique names

I'm having a hard time making a Perl script to correctly parse an XML file which looks like the following: tag_value
Gurzo
  • 707
  • 1
  • 8
  • 20
0
votes
2 answers

Trouble with PHP Simple XML

I'm having some trouble saving some data after using PHP's simplexml_load_file function. I want to go through the SimpleXML Object and if the data meets the requierments I want to put it in an array. The problem is that I can't get the value of the…
BFTrick
  • 5,211
  • 6
  • 24
  • 28
0
votes
1 answer

Perl XML:Simple read xml pairs and execute something on each of them

I have a XML file which contains the below section:
John Stadt
  • 500
  • 7
  • 17
0
votes
1 answer

XmlSimple - using xml_in() to parse data in Ruby on Rails

I have a simple XML file like this: In my controller I have: …
Michael Leveton
  • 333
  • 2
  • 7
  • 16
0
votes
0 answers

xmlsimple.rb:1006:in `find_xml_file': Could not find

I am not a programmer yet I found a ruby script to download VoiceMail from a voice mail system. It appears that the xml response is not being input. It is supposed to write the wav file to the path folder. I suspect there is an issue with this…
0
votes
1 answer

XMLSimple parse Key Value to Hash

i have the following xml: Some Text Some Content Some Text Some Content Some Text Some Content Some…
noOne
  • 1
0
votes
2 answers

what does error mean and how to fix it

error : The value of attribute "v" associated with an element type "currentversion" must not contain the '<' character.
user778199
0
votes
2 answers

Using xmlSimple.xmlIn(file) With Ruby

I am having trouble getting xmlSimple to run correctly in my .rb file. I am using xmlSimple.xmlIn(filename);, however, it seems there is an error with finding the correct file. I have moved the file to the bin and the file exists, meaning,…
Anthony
  • 1
  • 1
0
votes
1 answer

Unable to locate XML/Simple.pm in windows

I have strawberry perl installed in my C drive in windows and running a build from an existing big project. During the build there are some perl build scripts that needs to be executed and in the it throws the below error message: Below are the…
jxgn
  • 741
  • 2
  • 15
  • 36
0
votes
1 answer

How do I parse a hash to XML using XmlSimple?

I have a hash that i wanted to parse to XML using SimpleXML but there is a trick I dont know how to handle: My hash looks like: require 'xmlsimple' test = { "subroot" => { field1 => {'var1' = ['xyz'], 'var2' = ['yyyy']}, field2 => {'var1' =…
Leonardo Galani
  • 184
  • 5
  • 22
0
votes
1 answer

XmlSimple makes single-element arrays for every element -- is there a better way?

I'm using XmlSimple to turn an XML document into a ruby hash. It turns data like this: 2 0 200 Into this: { :resultPage => [ { :offset => [ "0" ], …
John Bachir
  • 22,495
  • 29
  • 154
  • 227