Quantcast

Streaming large XML files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Streaming large XML files

pdemilly
Hi,

I am trying to update a database managed by grails using a large XML
files generated by our legacy applications

currently my code is using  XmlSlurper but I am getting some errors

def customers = new XmlSlurper (false, false).parse (myxmlfile)
customers,customer.each { cust ->
     contracts.contract.each { cont ->
         cont.payments.payment.each { pmt ->
         }
     }
}

How can I make it streams over my file

TIA

Pascal




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Streaming large XML files

Alan Ryan
what errors are you getting? Is that the actual code?

On 21 October 2011 19:47, Pascal DeMilly (Grails) <[hidden email]> wrote:
Hi,

I am trying to update a database managed by grails using a large XML files generated by our legacy applications

currently my code is using  XmlSlurper but I am getting some errors

def customers = new XmlSlurper (false, false).parse (myxmlfile)
customers,customer.each { cust ->
   contracts.contract.each { cont ->
       cont.payments.payment.each { pmt ->
       }
   }
}

How can I make it streams over my file

TIA

Pascal




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





--


Alan Ryan

Senior Applications Engineer

http://www.3DIssue.com


Ph: 0766152084

 Follow 3D Issue on Twitter

Become a fan of 3D Issue on Facebook
Check out the 3D Issue Blog

Loading...