Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

XML Parser

Thread view: 
svoulgaris@gmail.com - 10 Jul 2007 23:57 GMT
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 - 24 Jul 2007 13:55 GMT
>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.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.