Sample Header Ad - 728x90

Deleting an XML tag in a huge file

5 votes
2 answers
1609 views
I have difficulty parsing a huge XML file (about 100GB with large nodes). I am trying to reduce the node sizes by deleting unnecessary tags. For example, any `` tags. If I use native XML parsers such as xmlstarlet xmlstarlet ed -P -d '//text' file.xml I face the same problem of being out of memory. Is there a safe way (with little memory footprint) to remove all `` pairs without breaking the XML structure?
Asked by Googlebot (2009 rep)
Jun 4, 2022, 01:07 AM
Last activity: Jun 4, 2022, 04:18 PM