Forum Discussion

darshan's avatar
darshan
New Contributor
16 years ago

error org.apache.xmlbeans.XmlException: error: XML declaration is not well forme

Hi,
Iam getting a XML declaration not well formed in my response since in the response the first line is an empty line and then the normal XML file starts. Is there anyway I could get rid of that empty line..or make my scripts ignore that empty line.

def holder = groovyUtils.getXmlHolder( "activateRequest#Response" )

Thank you,
Darshan

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    hmm.. have you disabled pretty-printing? (which should remove the empty line..)

    If that doesn't help, please try

    def xml = context.expand( '${activateRequest#Response}' ) 
    def holder = groovyUtils.getXmlHolder( xml.trim() )


    regards,

    /Ole
    eviware.com
  • darshan's avatar
    darshan
    New Contributor
    Thanks, it was some problem with the response.it was generating some garbage characters..