Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa XML complex xml parsing and storing in database

Have Programming Question? Ask it here!
 
 
 


devi
complex xml parsing and storing in database
1 Answer(s)      4 years and 6 months ago
Posted in : XML


Hi Experts ,i want to parse my xml document and store it in mysql database. This is my code. How to parse this complex data.
<?xml version="1.0"?>
<ZFLO_IDOC>
<IDOC BEGIN="1">
<EDI_DC40 SEGMENT="1">
<TABNAM>EDI_DC40</TABNAM>
<MANDT>800</MANDT>
<DOCNUM>0000000000557748</DOCNUM>
<DOCREL>620</DOCREL>
<STATUS>30</STATUS>
<DIRECT>1</DIRECT>
<OUTMOD>2</OUTMOD>
<IDOCTYP>ZFLO_IDOC</IDOCTYP>
<MESTYP>ZFLO_IDOC</MESTYP>
<STDMES>ZFLO_I</STDMES>
<SNDPOR>SAPDD5</SNDPOR>
<SNDPRT>LS</SNDPRT>
<SNDPRN>T90CLNT090</SNDPRN>
<RCVPOR>JIDOCPORT</RCVPOR>
<RCVPRT>LS</RCVPRT>
<RCVPRN>JAVAIDOC</RCVPRN>
<CREDAT>20100204</CREDAT>
<CRETIM>033500</CRETIM>
<SERIAL>20100130063646</SERIAL>
</EDI_DC40>
<Z1EDK01 SEGMENT="1">
<MANDT>800</MANDT>
<EXTID>0000000407</EXTID>
</Z1EDK01>
<E1EDK02 SEGMENT="1">
<QUALF>001</QUALF>
<BELNR>test</BELNR>
<DATUM>00000000</DATUM>
</E1EDK02>
<E1EDK02 SEGMENT="1">
<QUALF>002</QUALF>
<BELNR>0000008168</BELNR>
<DATUM>20090416</DATUM>
</E1EDK02>
<E1EDK14 SEGMENT="1">
<QUALF>008</QUALF>
<ORGID>3000</ORGID>
</E1EDK14>
<E1EDK14 SEGMENT="1">
<QUALF>012</QUALF>
<ORGID>TA</ORGID>
</E1EDK14>
<E1EDK14 SEGMENT="1">
<QUALF>016</QUALF>
<ORGID>3030</ORGID>
</E1EDK14>
<E1EDKA1 SEGMENT="1">
<PARVW>AG</PARVW>
<PARTN>0000003201</PARTN>
</E1EDKA1>
<E1EDKA1 SEGMENT="1">
<PARVW>WE</PARVW>
<PARTN>0000003201</PARTN>
</E1EDKA1>
<Z1EDK02 SEGMENT="1">
<QUALF>001</QUALF>
<FILRT> 0.000</FILRT>
</Z1EDK02>
<Z1EDK02 SEGMENT="1">
<QUALF>002</QUALF>
<FILRT> 9.771</FILRT>
</Z1EDK02>
<Z1EDK02 SEGMENT="1">
<QUALF>003</QUALF>
<FILRT> 9.090</FILRT>
</Z1EDK02>
<Z1EDP01 SEGMENT="1">
<POSEX>000010</POSEX>
<IDTNR>FG-01</IDTNR>
<KTEXT>fg-01</KTEXT>
<NETWR> 5000000.00</NETWR>
<CURCY>USD</CURCY>
<MENGE> 20000.000</MENGE>
<MENEE>ST</MENEE>
<WERKS>3000</WERKS>
<VSTEL>3000</VSTEL>
<OPQTY> 19985.000</OPQTY>
<FLAGM>s</FLAGM>
<Z1EDP20 SEGMENT="1">
<ETENR>0001</ETENR>
<MENGE> 20000.000</MENGE>
<ABFTZ>15.000</ABFTZ>
<LFIMG> 15.000</LFIMG>
<MENEE>ST</MENEE>
<Z1EDP03 SEGMENT="1">
<IDDAT>111</IDDAT>
<DATUM>20090427</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>112</IDDAT>
<DATUM>20091223</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>113</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>114</IDDAT>
<DATUM>20091221</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>115</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
</Z1EDP20>
<Z1EDP20 SEGMENT="1">
<ETENR>0002</ETENR>
<MENGE> 0.000</MENGE>
<ABFTZ>22.000</ABFTZ>
<LFIMG> 0.000</LFIMG>
<MENEE>ST</MENEE>
<Z1EDP03 SEGMENT="1">
<IDDAT>111</IDDAT>
<DATUM>20091223</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>112</IDDAT>
<DATUM>20091223</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>113</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>114</IDDAT>
<DATUM>20091221</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>115</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
</Z1EDP20>
</Z1EDP01>
<Z1EDP01 SEGMENT="1">
<POSEX>000020</POSEX>
<IDTNR>FG-88</IDTNR>
<KTEXT>Flatscreen LE 50 P</KTEXT>
<NETWR> 0.00</NETWR>
<CURCY>USD</CURCY>
<MENGE> 1000.000</MENGE>
<MENEE>ST</MENEE>
<WERKS>3000</WERKS>
<VSTEL>3000</VSTEL>
<OPQTY> 1000.000</OPQTY>
<FLAGM>s</FLAGM>
<Z1EDP20 SEGMENT="1">
<ETENR>0001</ETENR>
<MENGE> 1000.000</MENGE>
<ABFTZ> 0.000</ABFTZ>
<LFIMG> 0.000</LFIMG>
<MENEE>ST</MENEE>
<Z1EDP03 SEGMENT="1">
<IDDAT>111</IDDAT>
<DATUM>20090427</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>112</IDDAT>
<DATUM>20091223</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>113</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>114</IDDAT>
<DATUM>20091221</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>115</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
</Z1EDP20>
<Z1EDP20 SEGMENT="1">
<ETENR>0002</ETENR>
<MENGE> 0.000</MENGE>
<ABFTZ>87.000</ABFTZ>
<LFIMG> 0.000</LFIMG>
<MENEE>ST</MENEE>
<Z1EDP03 SEGMENT="1">
<IDDAT>111</IDDAT>
<DATUM>20091223</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>112</IDDAT>
<DATUM>20091223</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>113</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>114</IDDAT>
<DATUM>20091221</DATUM>
</Z1EDP03>
<Z1EDP03 SEGMENT="1">
<IDDAT>115</IDDAT>
<DATUM>20091222</DATUM>
</Z1EDP03>
</Z1EDP20>
</Z1EDP01>
</IDOC>
</ZFLO_IDOC>

Advertisement
View Answers

August 14, 2012 at 10:32 AM


Did You get the answer.



Related Tutorials/Questions & Answers:
complex xml parsing and storing in database - XML
complex xml parsing and storing in database  Hi Experts ,i want to parse my xml document and store it in mysql database. This is my code. How to parse this complex data. EDI_DC40 800 0000000000557748
storing xml into database - XML
storing xml into database   hi i have an xml file it contains... .......with it i know how to persist a simple xml file into data base but i m finding some difficulty to start with i m sending u the xml file
Advertisements
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  Hi..i tried the above code but I unable to know where can i place the xml file
xml parsing
xml parsing  my task is when i wll give java file to a program that program interpret that file separate each and every keywords and indentifiers... xml.. please anyone of you give some idea
storing data in xml - XML
storing data in xml  Can u plz help me how to store data in xml using java  Hi Friend, Try the following code: import java.io....,name,address,contactNo,email); System.out.println("Xml File Created
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 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
storing csv into oracle database
storing csv into oracle database  i want jsp code for storing csv file into oracle database
parsing xml with jquery
parsing xml with jquery  Please explain how to parse a xml file into jquery. Thanks
parsing xml using sax
parsing xml using sax  how to get values if the root elements are same and their attributes are different
Uploading a Software and storing in the database
Uploading a Software and storing in the database  I want to upload a software(may be of maximum 20mb) through JSP, and store it in the database. The coding present in the site for uploading and storing in the database
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
XML parsing using Java - XML
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
xml or database - XML
is a better way to retrieve and parse xml file directly using DOM or storing those xml files in Database and retrieve. My xml files will be about 100 - 200 and each... the problem : "parsingxml.jsp" Parsing of xml using JDOM
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 xml file using java code
parsing xml file using java code  parsing a xml file using java code
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
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 Complex XML using DOM/SAX Parser.
Read Complex XML using DOM/SAX Parser.  I have a XML file which is having two types of Items. I want to extract all details of a type only. My XML goes something like this <Movie> <Bollywood> <Actor> Shah Rukh
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... 0668420957700159USD you can find the above xml
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
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 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
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
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
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
to fetch data from ms word and storing into database
to fetch data from ms word and storing into database  i want to know how to fetch datafields from ms word and storing into database??? please answer soon .its urgent
Produces XML file but format not correct for storing data using JSP and XML
Produces XML file but format not correct for storing data using JSP and XML  hii I have created a project using JSP and XML as database to store data entered by user in XML file ,It stores data entered in XML file
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
getting and storing dropdown list in database in jsp
getting and storing dropdown list in database in jsp  i have a drop down list to select book from database. i'm able to retrieve dropdown list from... lyk this. but it storing null value in the database. :\ what to do
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
storing records which of a file into a table of mssql database
storing records which of a file into a table of mssql database  I have a requirement like this, A file contains some records with headers same as column names of a table. I have to store those records into a table
Storing records of a file inside database table in java
Storing records of a file inside database table in java  Here is my requirement, I have a file which contains some number of records like... the records inside the database except headings (Here sid,sname,age are headings
getting problem in storing & retrieving value in database
getting problem in storing & retrieving value in database  Hello everyone i am doing a project where my back end is ms access & i want to store value like 5353250214 so if i store it as long int in access it wont take it &
How to implement xml parsing in iphone ? -RV
How to implement xml parsing in iphone ? -RV  In .h file @interface RootViewController : UITableViewController<NSXMLParserDelegate>{ IBOutlet UITableView *page1; NSMutableArray *titlearray
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
XML Parsing Error: mismatched tag. Expected: </br>. - JSP-Servlet
XML Parsing Error: mismatched tag. Expected: .  i had an error:"XML Parsing Error: mismatched tag. Expected: ." when uploading and writing them into an xml file. i use the jspBean to call the writeXML class. pls help me to solve
Handling Errors While Parsing an XML File
Handling Errors While Parsing an XML File   ... parsing an XML document. JAXP (Java API for XML Processing) is an interface which provides parsing of xml documents. Here the Document BuilderFactory is used
Storing properties in XML file
Storing properties in XML file       This Example shows you how Store properties in a new XML File. JAXP (Java API for XML Processing) is an interface which provides parsing
XML in database - XML
XML in database  Hi Deepak, i m again facing problem with single element multiple tag in xml. i m trying to read the tag values into my database but it gives nullpointerexception. pls guide me appropriatly. MyXML
Store XML file into Sqlserver Database
Store XML file into Sqlserver Database  Code for storing a typical XML file into SQl server database in 1 or more tables using asp.net using C
storing details in database on clicking submit button - JSP-Servlet
storing details in database on clicking submit button  I am using JSP in NetBeans and have developed an application form which has fileds naming... database on clicking submit button. I am unable to do this.Can u tell me how to code
reading the records from a .xlsx file and storing those records in database table
reading the records from a .xlsx file and storing those records in database table  Here is my requirement, I want to read the records from a .xlsx file and store that records in database table. I tried like this public class
database data in xml format
database data in xml format  HI, i want to display the database data in the xml format(not as xml file ) on the console using DOM. help will be appreciated. THANKS K.K
How to convert XML file to database ?
How to convert XML file to database ?  How to convert XML file to database
retrieving xml document from database
retrieving xml document from database  Hi Guys, I want to retrieve the xml document stored in the database on to a jsp page using jdbc/odbc connnection.Please help me in implementing this feature. Thank You Madhu
simple code for XML database in JS
simple code for XML database in JS  Sir , i want a code in javascript for XML database to store details (username and password entered by user during registration process (login process)). please send me a code . Thank you
Store XML file into Sqlserver Database
Store XML file into Sqlserver Database  Code for storing a typical XML file into SQl server database in 1 or more tables using asp.net using C#. <?xml version="1.0" ?> <!DOCTYPE PubmedArticleSet (View Source
 

 

 

DMCA.com