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

  • Home
  • SEARCH
  • 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 5967499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:57:11+00:00 2026-05-22T19:57:11+00:00

I am experimenting with GroovyWS in the hope of completely replacing Axis2 client code.

  • 0

I am experimenting with GroovyWS in the hope of completely replacing Axis2 client code.

One of the Webservice operations I call returns fragments of XML, which I need to turn into Groovy Beans.

I am getting instances of com.sun.org.apache.xerces.internal.dom.ElementNSImpl coming out of the WebService call.

I can call new XmlSlurper().parseText(it as String) where it is the instance of ElementNSImpl.

However, of course this writes the Element out to a String before reparsing and slurping it. Is there a way to avoid this unnecessary step ?

Ultimately I want to turn the slurped object into a Groovy Bean; is there a better way to do this. I was wondering about DomToGroovy, but this still gives me a string that I then have run in a Groovy Shell.

  • 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-22T19:57:12+00:00Added an answer on May 22, 2026 at 7:57 pm

    I don’t think XmlSlurper supports direct conversions like that, you’d probably have to write something yourself. Maybe if you dig in to the XmlSlurper source there will be a way to do it by extending and adding a new parse() method. Otherwise, unless you have major performance concerns, I’d say you’re on the right track.

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

Sidebar

Related Questions

While experimenting a bit with C++ templates I managed to produce this simple code,
I am experimenting with following code: http://www.jsresources.org/examples/MidiNote.java.html to operate my Novation Launchpad MIDI Controller.
In experimenting with pickle, I've put together some code for a (very) simple blog.
Im experimenting with the following code private void timer1_Tick(object sender, EventArgs e) { Thread
I'm starting experimenting with WPF 3D rendering, and one of the first problems I'm
Experimenting using different approaches and reducing code maintenance I have ended up using reflection
After experimenting with an iterator block I noticed the generated IL code is not
After experimenting with composite operations and drawing images on the canvas I'm now trying
Im experimenting with some JQuery and timing. I use the code below just for
im experimenting in getting camel to do some file operations and pass them through

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.