Dear Ashjan,

If it was me I'd do it the cheap way and not use the parser.  Get the file
and then read through it with your favorite language and look for starting
tags you want moved, then scan until you hit the ending tag, write that out.
Rinse and repeat.  You can use the parser on each piece you write out.

It is surely possible to do it in both ways described and I know of other
that works on small files.  But this is a LOT easier.

Eric

-----Original Message-----
From: xml [mailto:xml-boun...@gnome.org] On Behalf Of Liam R E Quin
Sent: Thursday, July 04, 2019 6:28 AM
To: Ashjan Alsulaimani <alsul...@tcd.ie>; xml@gnome.org
Subject: Re: [xml] Xml Question

On Thu, 2019-07-04 at 10:33 +0100, Ashjan Alsulaimani wrote:
> 
> 
> What's the best way to approach such a task and the most efficient way 
> as I'm dealing with Medline database!

If your input files are a few hundred megabytes or less, start with the XSLT
identity transform and add empty templates to match what you want to delete.

If your input is over a gigabyte (say) or you do lots of different subsets
of the same document, you may find XQuery update works better for you, with
a databaase (e.g. BaseX or eXistb).

Liam


--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Upcoming courses: DocBook (sold out); CSS for XML People

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/ xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to