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
2
votes
2 answers

How to use XmlSimple to produce an XML element with attribute and text node?

I have a problem that sounds basic, but I haven't found a solution anywhere. I'm using the Ruby version of XmlSimple, specifically the xml_out function. The Problem I'm having trouble outputting an element which would have one attribute node and a…
Greg Kramida
  • 4,064
  • 5
  • 30
  • 46
2
votes
1 answer

XML::Simple leaving entities in attribute text

I have two systems, one RHEL5 and one Ubuntu 10.04, and they exhibit differing behavior. I'm using perl's XML::Simple to parse the response of a call to some SaaS software. The response is:
2
votes
2 answers

Ordering input tags in XML::Simple using Perl while printing the output in XML format

How to order the input tags in Perl code using XML::Simple module for printing the output in XML format in specified order.. i have tried this use XML::Simple; use Data::Dumper; open (FH,"> xml4.txt") || die (); # create array …
alily
  • 299
  • 2
  • 12
2
votes
1 answer

Android, help with a simpleframework PersistenceException

I am trying to use org.simpleframework.xml. classes to handle xml data on my Android project. I can't understand how to build my class "Point" contructor to match the xml definition: at run-time I get this…
MarcoS
  • 17,323
  • 24
  • 96
  • 174
2
votes
2 answers

In Ruby, is there a way to use XmlSimple when some values are nil?

As the nil will choke XmlSimple: >> require 'xmlsimple' => true >> XmlSimple.xml_out([{'a' => 1}, {'a' => 3}]) => "\n \n \n\n" but if it is the following, then it will give an error: >>…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
2
votes
2 answers

Change an XML file content via Perl script

This thread is in continuation of Perl script to populate an XML file. The file I want to change is:
hari
  • 9,439
  • 27
  • 76
  • 110
2
votes
3 answers

How do I compress XML from XML::Simple::XMLout?

I am using XML::Simple to parse and edit a very large XML file, and speed is essential (so far of all the method's I have tried XML::Simple has been the fastest) Now once all my edits are completed I print the XML to a document using XMLout(),…
Alex Angelini
  • 459
  • 1
  • 4
  • 12
2
votes
3 answers

How Can I Remove Magic Number when using XML::Simple?

I did a exercise like this, how do I calculate the # of XML elements collapsed into an array by XML::Simple so I don't have to hard-code the # of elements? I plan to use the code to parse a bigger xml file. I don't want to cout the elements by…
Nano HE
  • 9,109
  • 31
  • 97
  • 137
2
votes
1 answer

Parsing XML data into a different structure

I have the below XML file and I am trying to parse it
Novices
  • 23
  • 2
2
votes
2 answers

Merging XML document hierarchies

Background I'm designing a Perl application that uses XML files as inputs for config and settings information. There will be a hierarchy of documents, with global data overridden by more local information. My program will be invoked with the most…
lzc
  • 919
  • 7
  • 16
2
votes
1 answer

Search XML Element Value By Name Perl

I am basically a java developer but my client gave me small task in perl. The task is that I will get xml input in that I need to search a element and print it's value(save value in String variable). e.g. in below xml I want to read the value of…
Neeraj
  • 1,776
  • 2
  • 16
  • 35
2
votes
2 answers

Using XML::Simple for retrieving data in Perl

I've created the below XML file for retrieving data. Input: value1 value2
Vasanth
  • 365
  • 2
  • 13
2
votes
2 answers

Updating xml attribute value based on other with Perl

This is my sample xml file remote1 rev1 common opensource/device sa oss
rodee
  • 3,233
  • 5
  • 34
  • 70
2
votes
3 answers

How can I replace the tag in XML::Simple with the original tag name?

I'm using XML::Simple to edit an XML file. After which the updated data is sent to a new XML file. But this procedure produces tag to be added and the original parent tag is lost. I want to replace with the original tag name. How…
fixxxer
  • 15,568
  • 15
  • 58
  • 76
2
votes
1 answer

perl XML::Simple attributes blank

I'm trying to parse some XML into Perl, but testing isn't yielding what I'd expect. $buffer = qq[]; $xml = XML::Simple->new(…
dannix
  • 235
  • 2
  • 13