I have a large XML file (180 megs or so) that has lots of <offering> elements. I would like to delete all <offering>s that do not have a child element that matches a certain thing (<parent_id>12345</parent_id>). I’ve never used Xquery and it looks a bit intimidating (read: way more complex than I think it should be). Can anyone recommend a program that would allow me to easily do this?
In my brain it should be as easy as DELETE <offering> WHERE <parent_id> <> '12345' but all the xquery I’ve looked up looks like you have to declare a ton of crap and it’s multiple lines just to delete something.
I’ve found XML Marker Free, which brilliantly handles the large file but I can’t find an easy way to delete multiple elements that match specific criteria.
edit: I’m getting close using vbscript and XML DOM.*
Started playing with XML DOM via windows vbscript and came up with this solution which seems to work perfectly.