Tuesday, March 8, 2011

Re: How to process 1000 files xml to 1 file?

Neil D'Souza, Wed, Mar 09, 2011 at 12:59:02AM +0530:
> However an input file like this does not parse.
>
> <Patient>
> <lbpa_Npa>1234</lbpa_Npa>
> <lbpa_Nai>02-Oct-1923 00:00:00</lbpa_Nai>
> <Entree>15-Oct-1582 01:00:00</Entree>
> <Pid>0</Pid>
> <Ncas>0</Ncas>
> <pre10 />
> <lbpa_Pre>Peter</lbpa_Pre>
> <lbpa_Num_Npat>1234567</lbpa_Num_Npat>
> <lbrq_Nom1 />
> <lbpa_Adr2>Paris</lbpa_Adr2>
> <lbrq_Nom2 />
> <lbpa_Sexe>M</lbpa_Sexe>
> <nom10 />
> <lbrq_Rid>0</lbrq_Rid>
> <Actif />
> <lbpa_Adr />
> <lbpa_Nom>Smith</lbpa_Nom>
> <Adm />
> </Patient>
> <Demande>
> <Entree>15-Oct-1582 01:00:00</Entree>
> <lbde_Rid>12345</lbde_Rid>
> <lbde_Nlab>12345</lbde_Nlab>
> <Sortie>15-Oct-1582 01:00:00</Sortie>
> <NarunaFile />
> <Ncas>0</Ncas>
> <Etabl />
> <lbde_Num_Npat>12345</lbde_Num_Npat>
> <Naruna />
> <Date_Mod>01-Jan-1900 00:00:00</Date_Mod>
> <Taille>0</Taille>
> <lbde_pid>12345/111</lbde_pid>
> <TCollection>0</TCollection>
> <Semgr>0</Semgr>
> <lbrq_nom1 />
> <lbde_Dtprv>02-Mar-2011 06:00:00</lbde_Dtprv>
> <Pathologique>FALSE</Pathologique>
> <lbrq_nom2 />
> <Bacterio>FALSE</Bacterio>
> <Volume>0</Volume>
> <Type_www />
> <Poids>0</Poids>
> <lbde_Dtdem>02-Mar-2011 07:18:32</lbde_Dtdem>
> <PasVue>FALSE</PasVue>
> <par />
> <Domaine />
> </Demande>

Just guessing here, but it probably doesn't parse because a well-formed
XML document may not contain multiple root elements, so this technically
violates the XML grammar. If you wrap the above elements inside some
other element, the yacc parser would probably handle it as-is.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: