Re: [xml] Xml Question

2019-07-05 Thread Eric Eberhard
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 yo

Re: [xml] Xml Question

2019-07-05 Thread Liam R E Quin
On Fri, 2019-07-05 at 12:18 -0700, Eric Eberhard wrote: > Dear Ashjan, > > If it was me I'd do it the cheap way and not use the parser. Make sure to handle markup in comments and CDATA sections properly,and to process external files included with XInclude or by entities defined in the DTD. Work

Re: [xml] Xml Question

2019-07-05 Thread Eric Eberhard
Your answer is spot on. I don't know if he has markup and CDATA or if his files are large. If none of those are true, cheap is good :-) If it is a gig file with CDATA and markup, cheap would be bad. E -Original Message- From: Liam R E Quin [mailto:l...@holoweb.net] Sent: Friday, Jul

Re: [xml] Xml Question

2019-07-05 Thread Eric Eberhard
Oh -- if smaller file here is some cheap code that works fine. You will have to create a new document for each smaller pieces and then copy the pieces over like so: for (cur=fromwrk->cur;cur;cur=cur->next) { tmp = xmlCopyNode(cur,1); xmlAddChild(towrk->cur,tmp);