Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4574 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

in scriptmaker :

import groovy.xml.DOMBuilder

DOMBuilder.parse( new StringReader( "<xml><a>A</a><b>B</b></xml>" ) ).documentElement

returns [ xml: null ]

In my 'normal' Groovy environment, same code returns :

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

<xml>

<a>A</a>

<b>B</b>

</xml>

any idea ??

em

Posted

Try this


import groovy.xml.DOMBuilder



doc = DOMBuilder.newInstance().parseText( "<xml><a>A</a><b>B</b></xml>" )

return doc.documentElement as String



This topic is 4574 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.