FROM XML TO DBF
Moderator: Rathinagiri
- tomtagaris
- Posts: 107
- Joined: Tue Aug 23, 2016 2:43 pm
FROM XML TO DBF
I have e file xls
How can I extract its contents and pass them to a DBF file
Thanks for help
How can I extract its contents and pass them to a DBF file
Thanks for help
- Attachments
-
- Request.zip
- (105.12 KiB) Downloaded 155 times
-
- Posts: 194
- Joined: Thu Jul 16, 2020 5:42 pm
- DBs Used: DBF
Re: FROM XML TO DBF
Hi Tom,
I searched around for xml to dbf code, but so far could only find a dbf_to_xml routine.
I used the commercial CoolUtils XML converter, to generate the attached.
I searched around for xml to dbf code, but so far could only find a dbf_to_xml routine.
I used the commercial CoolUtils XML converter, to generate the attached.
- Attachments
-
- Converted_XML.zip
- (608.58 KiB) Downloaded 166 times
-
- Posts: 194
- Joined: Thu Jul 16, 2020 5:42 pm
- DBs Used: DBF
Re: FROM XML TO DBF
Also this, from WhiteRock software. It's a single dbf as opposed to several in the last sample.
It looks like there are some string conversion problems, perhaps related to Unicode.
It looks like there are some string conversion problems, perhaps related to Unicode.
- Attachments
-
- WhiteRock_XML_to_DBF.zip
- (79.49 KiB) Downloaded 164 times
- Claudio Ricardo
- Posts: 367
- Joined: Tue Oct 27, 2020 3:38 am
- DBs Used: DBF, MySQL, MariaDB
- Location: Bs. As. - Argentina
Re: FROM XML TO DBF
Hi... Try open with LibreOffice Calc (Similar to MsOffice Excel but open source and free !)
fix column width, and save to " dBase .dbf " I always do it, never fail !
fix column width, and save to " dBase .dbf " I always do it, never fail !
Corrige al sabio y lo harás más sabio, Corrige al necio y lo harás tu enemigo.
WhatsApp / Telegram: +54 911-63016162
WhatsApp / Telegram: +54 911-63016162
- dragancesu
- Posts: 921
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: FROM XML TO DBF
XML is an interesting format, basically an TXT file that you read as text
but you can see the structure in it, in this case the record is INVOICE
notepad++ displays xml nicely
the problem is that the tags are long and the dbf fields are limited to 10 characters
I think it is not difficult to write a program that will write this data into the appropriate structure
but you can see the structure in it, in this case the record is INVOICE
Code: Select all
<invoice>
<uid>767DE28C469B8930A2262FC9660FBC93E5E6CB08</uid>
<mark>400000000090274</mark>
<issuer>
<vatNumber>300950992</vatNumber>
<country>GR</country>
<branch>0</branch>
</issuer>
<counterpart>
<vatNumber>029690710</vatNumber>
<country>GR</country>
<branch>0</branch>
<address>
<postalCode>25001</postalCode>
<city>ΞΑΛΑΒΡΥΤΑ</city>
</address>
</counterpart>
<invoiceHeader>
<series>0</series>
<aa>7465</aa>
<issueDate>2020-10-11</issueDate>
<invoiceType>1.1</invoiceType>
<vatPaymentSuspension>false</vatPaymentSuspension>
<currency>EUR</currency>
<movePurpose>1</movePurpose>
</invoiceHeader>
<paymentMethods>
<paymentMethodDetails>
<type>5</type>
<amount>0</amount>
</paymentMethodDetails>
</paymentMethods>
<invoiceDetails>
<lineNumber>1</lineNumber>
<netValue>96.6</netValue>
<vatCategory>2</vatCategory>
<vatAmount>12.56</vatAmount>
</invoiceDetails>
<invoiceSummary>
<totalNetValue>96.6</totalNetValue>
<totalVatAmount>12.56</totalVatAmount>
<totalWithheldAmount>0</totalWithheldAmount>
<totalFeesAmount>0</totalFeesAmount>
<totalStampDutyAmount>0</totalStampDutyAmount>
<totalOtherTaxesAmount>0</totalOtherTaxesAmount>
<totalDeductionsAmount>0</totalDeductionsAmount>
<totalGrossValue>109.16</totalGrossValue>
</invoiceSummary>
</invoice>
the problem is that the tags are long and the dbf fields are limited to 10 characters
I think it is not difficult to write a program that will write this data into the appropriate structure
Re: FROM XML TO DBF
M., Ronaldo
By: IMATECH
Imation Tecnologia
By: IMATECH
Imation Tecnologia
Re: FROM XML TO DBF
See this tool:
You can also put the read data in an array and then process its contents.
Your sample xml file contains 999 invoices, but I "don't like" the Greek city and street names written in it. The xml file is declared as UTF-8, but Greek letters appear strangely for me.
You can generate a prg which can be helpful for parsing the xml and writing the read data to the DBF.You can also put the read data in an array and then process its contents.
Your sample xml file contains 999 invoices, but I "don't like" the Greek city and street names written in it. The xml file is declared as UTF-8, but Greek letters appear strangely for me.
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: FROM XML TO DBF
hi,
i did found hbmxml.LIB but that is for BCC or MSVC
is hbmxml avaiable for HMG
i did found hbmxml.LIB but that is for BCC or MSVC
have fun
Jimmy
Jimmy
Re: FROM XML TO DBF
for sure:
sources
c:\hmg\harbour\contrib\hbmxml
lib
c:\hmg\harbour\lib\libhbmxml
sources
c:\hmg\harbour\contrib\hbmxml
lib
c:\hmg\harbour\lib\libhbmxml
M., Ronaldo
By: IMATECH
Imation Tecnologia
By: IMATECH
Imation Tecnologia