Hi Babu, your sample xml schema contains only few fields, why not consider to use db (mysql)
todo: read your xml file, then use digester to convert to java object after that insert it your db. when your done with your insert stuff, you can simply query your db anytime you like. cheers, Buics On 12/4/06, Lukas Vlcek <[EMAIL PROTECTED]> wrote:
Hi, Try to look at Groovy (I haven't used it yet but some people say it is much easire to work with XML file in Groovy then in Java). It produces class files so it can be integrated with your exisitng Java code. 6MB file is not that much unless you are working in limited environment (like mobile device?). Also if the only thing you really need is to search for some strings in two files and you don't need to integrate this function with other Java code then you can simply go with *unix command line tools (grep, wc, ...) that should give you what you need very quickly. Lukas On 12/4/06, Eshwaramoorthy Babu <[EMAIL PROTECTED]> wrote: > > Hi Lukas, > > Thanks for your response. > I was planning to search for 1st xml ID's in 2nd XML. so I thought of > using > lucene for search. > Can you please suggest me some scripting solution. Is perl right solution? > > Thanks, > Babu > > > > > On 12/4/06, Lukas Vlcek <[EMAIL PROTECTED]> wrote: > > > > Hi Babu, > > > > Sorry but I don't see any point in using Lucene if you don't need search > > functionality. Also for parsing XML files I would consider using some > > scripting language (as opposed to pure Java based solution). The reason > is > > that scripting languages can be more effectire when simplicity of result > > code is important and as of Java 6 they can run right inside JVM - so > > integration with you java code is very simple. > > > > Just my 2 cents. > > > > Lukas > > > > On 12/4/06, Eshwaramoorthy Babu <[EMAIL PROTECTED]> wrote: > > > > > > Hi , > > > > > > we have a requirement to compare 2 xml files and generate > > > result(reconcilation report). > > > The xml file size is 6MB each and the flrmat is as below > > > <Data> > > > <Id>123</Id> > > > <Amount>123</Amount> > > > </Data> > > > > > > > > > I have to implement the below logic > > > > > > Number of matching ID'S in both xml > > > Number of non matching ID'S in both xml > > > Number of non matching ID'S in both xml > > > > > > I am planning to use digester and lucene for my above requirement. > > > > > > Is my desicion of using lucene correct? or is there any bettwr > approch > > > for > > > my above problem. > > > > > > Thanks, > > > Babu > > > > > > > > > > > >
-- "Programs must be written for people to read, and only incidentally for machines to execute." - Abelson & Sussman, SICP, preface to the first edition