XML parsing using Java

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









Related Tutorials/Questions & Answers:
XML parsing using Java - XML
XML parsing using Java  I'm trying to parse a big XML file in JAVA..." in element "MIRate"(THE XML code is below).once he enters coverage rate I need... for it skipping all the elements in Table 1. I'm usin using saxparser, startelement
parsing xml file using java code
parsing xml file using java code  parsing a xml file using java code
Advertisements
parsing xml using sax
parsing xml using sax  how to get values if the root elements are same and their attributes are different
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
Parsing XML using Document Builder factory - XML
Parsing XML using Document Builder factory  Hi , I am new to XML . I am trying to parse a XML file while is : For this i am using Document builder factory parser . This is required inside a STAX job.The development env
java with xml parsing - Java Beginners
java with xml parsing  Hi, I need the sample code for parsing complex data xml file with java code. Example product,category,subcategory these type of xml files and parse using java. Please send the code immediately its very
parsing word xml file using SAX parser - XML
parsing word xml file using SAX parser  i am parsing word 2003's XML file using SAX.here my question is,i want to write some tag elements which... this xml file and write that xml part into file? can somebody
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... saxParser = saxParserFactory.newSAXParser(); // Parsing XML Document
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... saxParser = saxParserFactory.newSAXParser(); // Parsing XML Document
java with xml parsing - Java Beginners
java with xml parsing  Hi, I need the sample code for parsing complex data xml file with java code. Example product,category,subcategory these type of xml files and parse using java. Please send the code immediately its very
Parsing repeatitive xml elements using SAX Parser - XML
Parsing repeatitive xml elements using SAX Parser  Hi, I'm using SAX Parser to read an XML file. My XML file contains repeatitive tags. I'm able to retrieve all the values from the xml file. However, for repeatitive tags
parsing XML file to get java object - XML
parsing XML file to get java object  Hello, I'm facing a problem in parsing XML file to get the java object. I've tried to retrieve data from XML file using SAX parser. my XML file structure is the following
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
xml parsing - XML
± how can i do this?   Hi friend, Parsing The XML File using DOM parser in JSP visit to : http://www.roseindia.net/jsp/parsing-xml.shtml...xml parsing  Hi i want to parse the xml document which contains US en
Xml parsing
Xml parsing  Hi..i tried the above code but I unable to know where can i place the xml file
parsing xml file in jsp
parsing xml file in jsp  example that pars XML file in JSP
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
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
parsing xml with jquery
parsing xml with jquery  Please explain how to parse a xml file into jquery. Thanks
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
accessing xml using java
accessing xml using java  I need to retrieve some elements in xml file using java   Hi Friend, Please visit the following links:ADS_TO_REPLACE_1 http://www.roseindia.net/xml/Listingnode.shtml http://www.roseindia.net
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
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.23.0.957 is released. Learn to use sonar-xml-parsing version 1.23.0.957 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.23.0.957 java library in your... 1.23.0.957 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.22.0.848 is released. Learn to use sonar-xml-parsing version 1.22.0.848 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.22.0.848 java library in your... 1.22.0.848 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.10.1.446 is released. Learn to use sonar-xml-parsing version 1.10.1.446 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.10.1.446 java library in your... 1.10.1.446 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.20.0.801 is released. Learn to use sonar-xml-parsing version 1.20.0.801 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.20.0.801 java library in your... 1.20.0.801 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.19.0.786 is released. Learn to use sonar-xml-parsing version 1.19.0.786 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.19.0.786 java library in your... 1.19.0.786 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.17.0.740 is released. Learn to use sonar-xml-parsing version 1.17.0.740 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.17.0.740 java library in your... 1.17.0.740 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.16.0.719 is released. Learn to use sonar-xml-parsing version 1.16.0.719 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.16.0.719 java library in your... 1.16.0.719 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.14.1.690 is released. Learn to use sonar-xml-parsing version 1.14.1.690 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.14.1.690 java library in your... 1.14.1.690 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.14.0.681 is released. Learn to use sonar-xml-parsing version 1.14.0.681 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.14.0.681 java library in your... 1.14.0.681 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.13.0.662 is released. Learn to use sonar-xml-parsing version 1.13.0.662 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.13.0.662 java library in your... 1.13.0.662 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 2.0.0.1075 is released. Learn to use sonar-xml-parsing version 2.0.0.1075 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 2.0.0.1075 java library in your... 2.0.0.1075 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 2.0.1.1099 is released. Learn to use sonar-xml-parsing version 2.0.1.1099 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 2.0.1.1099 java library in your... 2.0.1.1099 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.25.0.1003 is released. Learn to use sonar-xml-parsing version 1.25.0.1003 in Maven based Java projects
; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.25.0.1003 java library... 1.25.0.1003 of sonar-xml-parsing released The developers of   org.sonarsource.analyzer-commons - sonar-xml-parsing project have released the latest
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.28.0.1058 is released. Learn to use sonar-xml-parsing version 1.28.0.1058 in Maven based Java projects
; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.28.0.1058 java library... 1.28.0.1058 of sonar-xml-parsing released The developers of   org.sonarsource.analyzer-commons - sonar-xml-parsing project have released the latest
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.24.0.965 is released. Learn to use sonar-xml-parsing version 1.24.0.965 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.24.0.965 java library in your... 1.24.0.965 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.27.0.1040 is released. Learn to use sonar-xml-parsing version 1.27.0.1040 in Maven based Java projects
; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.27.0.1040 java library... 1.27.0.1040 of sonar-xml-parsing released The developers of   org.sonarsource.analyzer-commons - sonar-xml-parsing project have released the latest
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.21.0.829 is released. Learn to use sonar-xml-parsing version 1.21.0.829 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.21.0.829 java library in your... 1.21.0.829 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.18.0.756 is released. Learn to use sonar-xml-parsing version 1.18.0.756 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.18.0.756 java library in your... 1.18.0.756 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.15.0.699 is released. Learn to use sonar-xml-parsing version 1.15.0.699 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.15.0.699 java library in your... 1.15.0.699 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.14.0.678 is released. Learn to use sonar-xml-parsing version 1.14.0.678 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.14.0.678 java library in your... 1.14.0.678 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 2.1.0.1111 is released. Learn to use sonar-xml-parsing version 2.1.0.1111 in Maven based Java projects
for using the latest version of org.sonarsource.analyzer-commons - sonar-xml-parsing...; org.sonarsource.analyzer-commons - sonar-xml-parsing version 2.1.0.1111 java library in your... 2.1.0.1111 of sonar-xml-parsing released The developers of  
Maven dependency for org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.26.0.1029 is released. Learn to use sonar-xml-parsing version 1.26.0.1029 in Maven based Java projects
; org.sonarsource.analyzer-commons - sonar-xml-parsing version 1.26.0.1029 java library... 1.26.0.1029 of sonar-xml-parsing released The developers of   org.sonarsource.analyzer-commons - sonar-xml-parsing project have released the latest
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
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
problems in parsing the xml with the special characters
problems in parsing the xml with the special characters  Hi, I have a problem, in while parsing the xml with special characters apstrophe('). I am... parse this string in xml path. i am not able to fetch the adam's string in the xml
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> <

Ads