Discussion:
clear work object from parsed XML
(too old to reply)
s***@gmail.com
2018-05-03 15:29:04 UTC
Permalink
I'm parsing an XML from conn["inv:CustomersInventoryResponse"] to work["test"].
After I extract the information I need I want to remove the object work["test"] to free up some memory.
Using work.removeAttribute("test"); doesn't work. I've tried many other options, but non of them are working.
Please advise how I can remove it.
Franzw
2018-05-04 08:41:19 UTC
Permalink
Post by s***@gmail.com
I'm parsing an XML from conn["inv:CustomersInventoryResponse"] to work["test"].
After I extract the information I need I want to remove the object work["test"] to free up some memory.
Using work.removeAttribute("test"); doesn't work. I've tried many other options, but non of them are working.
Please advise how I can remove it.
Have you tries this :

work["test"]=null

It will not remove the attribute as such but it will remove the content.

BTW - you say removeAttribute() does not work - can you qualify that ?
And - instead of storing your xml in an attribute - would creating a separate Entry not be easier ?

HTH
Regards
Franz WOlfhagen
Eddie Hartman
2018-05-04 10:33:26 UTC
Permalink
Post by s***@gmail.com
I'm parsing an XML from conn["inv:CustomersInventoryResponse"] to work["test"].
After I extract the information I need I want to remove the object work["test"] to free up some memory.
Using work.removeAttribute("test"); doesn't work. I've tried many other options, but non of them are working.
Please advise how I can remove it.
As Franz asked, removeAttribute() should be working. If not, then please report this! It is a vital Entry method and I use it all the time. How have you confirmed that this is not working? If you are looking at memory usage only then you may have to invoke garbage collection (or wait for it to occur) in order to see memory freed.
Loading...