First of all I would like to send greetigs to every member of this
forum and to any other member in any other forum.
Now to my subject:
I have made a parser that reads an XML file and sends the output in a
txt or xml form. So far so good.
Now I want to use a datasource file (txt file) and compare it with the
parser's output just to get some specific attributes that are (or are
not) in xml file.
i.e. I have a datasource file like this:
Procedure: web.ifc_print.print_car_loan_package
Columns:
pIdEmp [NUMBER]
pPackageCode [VARCHAR2]
pPackageNumCredit [VARCHAR2]
pIdCreditArr [VARCHAR2]
pCursor [REF CURSOR]
JasperReports XML document fields:
<field name="name1" class="java.lang.String"/>
<field name="name2" class="java.lang.String"/>
<field name="status" class="java.util.Date"/>
<field name="employeename" class="java.lang.String"/>
.................................................. ..
So, I want to find out which variables in datasource are not used in
given templates, and other like this.
Any idea on how will I compare the two files?
Thanks a lot in advance
>So, I want to find out which variables in datasource are not used in
>given templates, and other like this.
>
>Any idea on how will I compare the two files?
It is not quite clear what you are up to, but I think you need to
parse the non-XML file. and extract the data and put it in a tree
similar to what you get from your XML parse. Then you compare trees.
See http://mindprod.com/jgloss/parser.html
My copy of Generating Parsers with JavaCC just arrived in the mail
today. It is a gentle introduction. He does not presume you already
know everything the way so many authors do.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com