Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9279783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:43:01+00:00 2026-06-18T17:43:01+00:00

I am using the perl module XML::Simple to create an XML structure. Everything works

  • 0

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 </tag1> afterwards.

I use the string with XML::Simple as follows

my $simple = XML::Simple->new();
my $tree = $simple->XMLin($my_xml_string, ForceArray => 1);

$resp->data()->{'xml'} = $tree;

The xml attribute id seems to be a protected attribute, because i get name in the output .

What config is needed to be able to set it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:43:02+00:00Added an answer on June 18, 2026 at 5:43 pm

    Look at the KeyAttr option. You probably want KeyAttr => [] to de-activate array to hash folding

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an XML file using Perl and XML::Simple module. I successfully create the
I have a stylesheet I'm using with a perl module that only works with
I'm using Perl's Calendar module to create a date, and I want to serialize
I'm using Perl's XML::Twig module to transform XML into (X)HTML. I need to output
I have a Perl module that handles localization tasks using the GNU gettext utilities
Given that I'm using Module::Build to build my perl module, I'd like to test
Using perl's XML::SAX module I'm parsing (x)html templates, and as a result am simply
I'm using the Perl module of Statistics::Regression . It runs multi-variate regressions fine. However,
I'm using Perl's Archive::Tar module. Problem with it is it pulls everything on to
Using the Perl module Net::Telnet, how do you send an arrow key to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.