Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

XML Parser

0 views
Skip to first unread message

svoul...@gmail.com

unread,
Jul 10, 2007, 6:57:06 PM7/10/07
to
Hello,

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

Roedy Green

unread,
Jul 24, 2007, 8:55:31 AM7/24/07
to
On Tue, 10 Jul 2007 15:57:06 -0700, svoul...@gmail.com wrote, quoted
or indirectly quoted someone who said :

>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

0 new messages