XML parsing using Java

Ads
 

XML parsing using Java

I'm trying to parse a big XML file in JAVA.

The goal is like i will take console input from user until "Coverage" in element "MIRate"(THE XML code is below).once he enters coverage rate I need to display initial and renewal rate. Like if he enter all the attribute values starting "EffDate= 2008-09-02" to "Coverage=35" , the output should be IntialRate="0.03100" RenewalRate1="0.03100".

I'm facing problem switching between tables. Like I need to select one table if input SheetName="PMI_STANDARD_MONTHLY", if the input SheetName="StandardMonthly_BPMI_GE5Yr_Fixed_10_01_2008" i need to go for it skipping all the elements in Table 1.

I'm usin using saxparser, startelement and I'm checking for attribute values. But if my sheetName is "StandardMonthly_BPMI_GE5Yr_Fixed_10_01_2008" its showing as if it is not matched rather than jumping to the table at bottom.
Can someone help me figuring it out.


- <MITables EffDate="2008-09-02" SheetName="PMI_STANDARD_MONTHLY">
- <MIPremiumPaymentType MIPremiumPaymentType="BorrowerPaid">
- <PaymentType PaymentType="ARM">
- <AmortTerm AmortTermGt="60" AmortTermMax="480">
- <CreditScore CreditScoreGt="580" CreditScoreMax="599">
- <PaymentPlan PaymentPlan="Level Annual">
- <RefundType RefundType="Refundable">
- <RenewalType RenewalType="Declining">
- <LTV LTVgt="0.00" LTVmax="85.00">
<MIRate Coverage="35" IntialRate="0.03100" RenewalRate1="0.03100" />
<MIRate Coverage="33" IntialRate="0.02940" RenewalRate1="0.02940" />
<MIRate Coverage="30" IntialRate="0.02700" RenewalRate1="0.02700" />
....
more lines of code
....
- <MITables EffDate="2008-09-02" SheetName="StandardMonthly_BPMI_GE5Yr_Fixed_10_01_2008">
- <MIPremiumPaymentType MIPremiumPaymentType="BorrowerPaid">
- <PaymentType PaymentType="Fixed">
- <AmortTerm AmortTermGt="60" AmortTermMax="480">
- <CreditScore CreditScoreGt="580" CreditScoreMax="599">
- <PaymentPlan PaymentPlan="Level Annual">
- <RefundType RefundType="Refundable">
- <RenewalType RenewalType="Declining">
- <LTV LTVgt="0.00" LTVmax="85.00">
<MIRate Coverage="35" IntialRate="0.02200" RenewalRate1="0.02200" />
<MIRate Coverage="33" IntialRate="0.02090" RenewalRate1="0.02090" />
<MIRate Coverage="30" IntialRate="0.01920" RenewalRate1="0.01920" />

Thanks,
Regards,

View Answers

Ads









Related Tutorials/Questions & Answers:
parsing xml file using java code
parsing xml file using java code  parsing a xml file using java code
parsing xml using sax
parsing xml using sax  how to get values if the root elements are same and their attributes are different
Advertisements
XML Parsing Using Sax Parser in J2ME for serverside
XML Parsing Using Sax Parser in J2ME for serverside  Hai team, i have doubt in Parsing using sax parser in serverside plz help me for xml parsing in j2me using sax parser on server side thanks in advance... regards Selva
XML Parsing Using Sax Parser in J2ME
XML Parsing Using Sax Parser in J2ME  Hai team, I hope you, You should help me, I have trouble in Xml parsing... I have decoded value, what... to do xml parsing help me for that... Regards Alagu
Java XML Parsing Using DOM
Java XML Parsing Using SAX To Parse XML document using SAX parser method you... = saxParserFactory.newSAXParser(); // Parsing XML Document by calling parse method... = saxParserFactory.newSAXParser(); // Parsing XML Document by calling parse method of SAXParser
Java XML Parsing Using SAX
Java XML Parsing Using SAX To Parse XML document using SAX parser method you... = saxParserFactory.newSAXParser(); // Parsing XML Document by calling parse method... = saxParserFactory.newSAXParser(); // Parsing XML Document by calling parse method of SAXParser
XML parsing to Mysql database
XML parsing to Mysql database  Can someone please post the code for parsing an XML file into Mysql database using SAX
xml parsing
xml parsing  my task is when i wll give java file to a program... and return the csv file that contains count of used keywords and idenfiers by using xml.. please anyone of you give some idea
Question about parsing XML document with DOM in JAVA.
Question about parsing XML document with DOM in JAVA.  Hi, I need to parse a XML file witch has info about classes. So i have for each class to have... it with multiple for loops, one iside the other but it doesnt work. My XML is this below
Read XML using Java
/xmlParsing/java-xml-parsing-using-sax.shtml http://www.roseindia.net/xml/sax... of all i need to read xml using java . i did good research in google and came to know...Read XML using Java  Hi All, Good Morning, I have been working
Xml parsing
Xml parsing  Hi..i tried the above code but I unable to know where can i place the xml file
xml document parsing
xml document parsing   Hi Guys, Xml document has been inserted into the database,how do i parse the xml document stored in database,so that xml document can be retrieved on to JSP file using jdbc/odbc connection. Please help me
parsing xml file in jsp
parsing xml file in jsp  example that pars XML file in JSP
parsing xml with jquery
parsing xml with jquery  Please explain how to parse a xml file into jquery. Thanks
read xml using java
read xml using java  <p>to read multiple attributes and elements from xml in an order.... ex :component name="csl"\layerinterfacefile="poo.c... element to b printed... here is the xml code......................</p> <
Interceptors Configuration using Java or XML
In this section, you will learn about how to configure interceptors using Java or XML
xml file reading using java
xml file reading using java  hi deepak I want to read some data from xml file and send that output to particular email address using java   import org.w3c.dom.*; import org.w3c.dom.Node; import javax.xml.parsers.
XML Parsing from php web server in J2ME
XML Parsing from php web server in J2ME  Hello Team, You gave some tips for XML parsing in java, i need some additional tips for xml parsing from php web server in j2me... Thanks and Regards Alagu
xml Converting to java using JDOM
xml Converting to java using JDOM  Hello , I am new to java and JDom so i make a Xml file and i need help to read it from java using objects , my... should be inside a student object i will include the java code and xml code and i
how to create xml schema from xml doc using java
how to create xml schema from xml doc using java  i want to create xml schema from xml document programatically using java... am using Netbeans IDE 7.0 i hav created the xml document for a table of data from Database... now i
how to read and write an xml file using java
how to read and write an xml file using java  Hi Can anyone help me how to read and write an xml file which has CData using java
Sending and receiving xml message using Java Program
Sending and receiving xml message using Java Program  Hi Friends, I want to send and receive xml files between two java programs using wire format, could you suggest me the steps to be followed to acheive it or suggest some
Sending and receiving xml message using Java Program
Sending and receiving xml message using Java Program  Hi Friends, I want to send and receive xml files between two java programs using wire format, could you suggest me the steps to be followed to acheive it or suggest some
How to Split a large XML file using java?
How to Split a large XML file using java?  How can we split a 500MB Xml file?I know how to split xml file after reading the entire document in a file.Here we cannot load the entire file as it is a large file
How to read value from xml using java?
How to read value from xml using java?  Hi All, I want to read value from following xml using java.. In <Line>,data is in format of key... in advance <pre lang="xml"> &lt;?xml version="1.0" encoding="UTF-8" ?>
Truncating issue while parsing XML with SAX Parser.
Truncating issue while parsing XML with SAX Parser.  I am Parsing one xml file and after parsing I have to enter the data into the database using hibernate. The problem is while parsing some elements, its not getting the complete
HOW TO SAVE XML INTO MYSQL AND RETRIEVE IT USING JAVA
HOW TO SAVE XML INTO MYSQL AND RETRIEVE IT USING JAVA  H ello, i have an xml code, i need to save it into mysql 5.5 server database using java. i... as xml and retrieve it the same way i saved it. SOMEONE PLEASE HELP.... this is my
How to values from xml using java?
How to values from xml using java?  Hi All, I want to read value from following < Line> xml using java.. In < Line>,data is in format of key and value pair.. i want to read only values..could u plz help me
XML to DB2 Comparison using Java xpath
XML to DB2 Comparison using Java xpath  Hi , I am a manual tester...' products . i want to compare these xml values with db2 using Java. I have Good knowledge in C, C++ and Ok with java. I am planning to use xpath to get details
Problem facing in SAX Parsing - XML
Problem facing in SAX Parsing  I have facing the issue in SAX Parsing like i have got the xml and the xml structure is like below... can find the above xml there is no CountryCode in the second record and 4th
download xml file from website using java code
download xml file from website using java code  how to download xml file from website using java code

Ads