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 3977906
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:58:48+00:00 2026-05-20T04:58:48+00:00

I have quickly managed to get domain classes to be created via a REST

  • 0

I have quickly managed to get domain classes to be created via a REST POST, but am stuck on how to create multiple creates for a xml file with multiple objects of the same type in, eg where as I was successful with

<Track>
       <trackAlbumName> Songs for Polar Bears </trackAlbumName>
       <trackArtistName> Snow PAtrol </trackArtistName>
       <trackSongTitle> First Song </trackSongTitle>
</Track>

I have added a UploadTrackGroup domain class, and now wish to create multiple Track objects in the same upload, eg I was hoping to POST something like;

<?xml version="1.0" encoding="utf-8"?>

<UploadTrackGroup>

    <Track>
       <trackAlbumName> Songs for Polar Bears </trackAlbumName>
       <trackArtistName> Snow PAtrol </trackArtistName>
       <trackSongTitle> First Song </trackSongTitle>
    </Track>

    <Track>
       <trackAlbumName> Different Class </trackAlbumName>
       <trackArtistName> Pulp </trackArtistName>
       <trackSongTitle> Misshapes </trackSongTitle>
    </Track>

    <Track>
       <trackAlbumName> F Sharp A Sharp </trackAlbumName>
       <trackArtistName> Godspeed You Black Emperor </trackArtistName>
       <trackSongTitle> Dead Flag BLues</trackSongTitle>
    </Track>

</UploadTrackGroup>

But I’ll be damned if I can get it to work.

When I try to use the following code in my controller;

println params

params.UploadTrackGroup.each {
    println "-->" + it
}

I only see a single track, eg

[action:create, controller:recognisedSong, UploadTrackGroup:[Track: F Sharp A Sharp  Godspeed You Black Emperor  Dead Flag BLues]]

-->Track= F Sharp A Sharp  Godspeed You Black Emperor  Dead Flag BLues
  • 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-05-20T04:58:48+00:00Added an answer on May 20, 2026 at 4:58 am

    I was successful in achieving what I wanted by effectively ignoring the parent UploadTrackGroup node, and simply using

     request.XML.Track.each { 
                      println it.trackAlbumName.text() + " " + it.trackArtistName.text()
                  }
    

    It would appear that as soon as I try to specify the exact qualified path to the Track nodes, ie UploadTrackGroup.Track.each or various variations thereof, it doesnt work.

    So it goes.

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

Sidebar

Related Questions

I have managed to setup a blog on localhost quickly using wordpress. But what
I have a problem to manage long paths. How can I get quickly to
I have managed to get a ContactsContact.Directory working for the most part (http://stackoverflow.com/questions/7436969/contactscontract-directory-how-do-i-return-a-photo), and
I have to quickly make a form that has optional menus depending on the
I have the need to relatively quickly be able to determine if a set
I have 10 small images that have to be shown quickly one after another
Does anyone have any tricks for quickly laying out the asp.net html markup for
im hoping someone can help me quickly with a question i have. As site
I'm trying to learn OpenGL ES quickly (I know, I know, but these are
What guarantees are the for the garbage collector? From my research I have managed

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.