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
0
votes
1 answer

How do I specify that an XML::Simple data point is a node and not an attribute?

I'm trying to build XML that looks like this using XML::Simple: 0x123abc Gi1/1 0x123abc
Jon A
  • 362
  • 4
  • 14
0
votes
2 answers

printing out a XML::SImple hash sorted by attributes

I have an XML file that looks like this : Book 1 author 1 Book 1 author 2 Book 1 title Book1ISBN
capser
  • 2,442
  • 5
  • 42
  • 74
0
votes
1 answer

print hash key with converted hash xml simple

I am new with perl and i want to get keys of Hash table generated using XML::SIMPLE module like this $data = $xml->XMLin("tp.xml"); Here is the structure generated $VAR1 = { 'technical-profile' => { 'WEB' => { …
HobbitOfShire
  • 2,144
  • 5
  • 24
  • 41
0
votes
1 answer

Perl: Accessing XML::Simple values in scalar context

Given the following XML::Simple object how would I copy one of the key values into a scalar assignment. The output below if from print Dumper($xmlobjectreturnedfrommodule);. $VAR1 = { 'Address2' => {}, 'City' => {}, …
MattSizzle
  • 3,145
  • 1
  • 22
  • 42
0
votes
2 answers

How can I save XML data to a file with XML::Simple?

I'm using XML::Simple package to import an XML file and change a few properties of some of the child tags. The change is visible when the data is dumped with: print Dumper($data); But how can I write this edited data into a new XML file? I did go…
fixxxer
  • 15,568
  • 15
  • 58
  • 76
0
votes
2 answers
0
votes
1 answer

How can I use XML::Simple to configure HTML::FormFu?

I assume you can use XML::Simple with HTML::FormFu because FromFu uses Config::Any to load it's config data. However, I can't seem to find any sample xml configs being used with HTML::FormFu. Not only am I getting an error. I'm not sure my xml is…
hog
  • 29
  • 1
  • 6
0
votes
2 answers

Perl XML::Simple for parsing internal nodes

I want to parse the XML file that I have here and print the id attribute of internal elements. This is the XML file
shaq
  • 187
  • 4
  • 13
0
votes
1 answer

How to retrieve node with same name in XML simple in perl

I have an xml file and I want to compare ids from entry node to id from reaction node and if are the same like the example below I want to access all the information of reaction (substrate id and product id). I have two product id and this code…
shaq
  • 187
  • 4
  • 13
0
votes
1 answer

Read XML file into user Perl class using XML::Simple

I have a Perl object containing one scalar and two arrays of hashes. I am using XML::Simple to save an XML copy of this data structure, but when I try to read in the XML file using XMLin I am getting a different data structure. Is there any way to…
user2479059
  • 63
  • 1
  • 6
0
votes
2 answers

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 actually has this issue:…
vobelic
  • 51
  • 1
  • 5
0
votes
2 answers

How can I extract values from the XML::Simple's data structure?

I'm trying to figure out how to parse the values from the first 2 (37% and 61.8F) in this XML. I can't figure it out since it seems that they have the same field names and are all under 'sensor'... any help would be…
Josh G
  • 3
  • 1
  • 2
0
votes
1 answer

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 Data::Dumper; use XML::Simple; my $base_dir = '.'; my…
AndyH
  • 95
  • 1
  • 1
  • 5
0
votes
2 answers

How can I convert JSON boolean values for output using XMLout?

There are boolean values in the JSON data structure I am using. When call decode_json to convert it to a Perl data structure and feed to the XMLout function provided by XML::Simple, it throws an error because XMLout does not know how to deal with…
Susheel Javadi
  • 3,034
  • 3
  • 32
  • 34
-1
votes
2 answers

Perl XML::Simple: SuppressEmpty for xsi:nil-Elements without content?

I'm struggling with XML::Simple in Perl and nullable Elements. So this is my example-XML: 123 If I read this with XMLin and…
Streuner
  • 125
  • 1
  • 1
  • 15