473,409 Members | 1,934 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

Conversion of binary flat file to XML

This is an announcement of a bidirectional converter between binary flat
file and XML.

It is different from other converters because

it is free,

it is web-based, nothing to download,

it does not try to target a few commercially important file types, it
tries to be general and flexible,

it does not require you to learn a new language, it uses XML schema with
some foreign attributes.

If you want to check it out, the converter is located at
http://www.datamech.com/XMLForm/XMLandBinary.html

description can be found at
http://www.datamech.com/XMLForm/aboutXmlAndBinary.html
data_mechanic(at)yahoo(dot)com

*** Sent via Developersdex http://www.developersdex.com ***
Mar 26 '06 #1
1 1786
I would like to add a few words about the converter.

File formats like csv are just rows of records with fields. They are
very regular. For example, the csv data

And Now For Something Completely Different,1971,Ian MacNaughton
Monty Python And The Holy Grail,1975,Terry Gilliam and Terry Jones
Monty Python's Life Of Brian,1979,Terry Jones
Monty Python Live At The Hollywood Bowl,1982,Terry Hughes
Monty Python's The Meaning Of Life,1983,Terry Jones

can be converted to XML such as

<MontyPython>
<movie>
<title>And Now For Something Completely Different</title>
<releaseDate>1971</releaseDate>
<director>Ian MacNaughton</director>
</movie>
<movie>
<title>Monty Python And The Holy Grail</title>
<releaseDate>1975</releaseDate>
<director>Terry Gilliam and Terry Jones</director>
</movie>
<movie>
<title>Monty Python's Life Of Brian</title>
<releaseDate>1979</releaseDate>
<director>Terry Jones</director>
</movie>
<movie>
<title>Monty Python Live At The Hollywood Bowl</title>
<releaseDate>1982</releaseDate>
<director>Terry Hughes</director>
</movie>
<movie>
<title>Monty Python's The Meaning Of Life</title>
<releaseDate>1983</releaseDate>
<director>Terry Jones</director>
</movie>
</MontyPython>

You do not really gain a lot by converting to XML, reading the original
csv file by human is almost as easy as reading the XML. Reading the csv
file by program (such as Python, where the above example comes from) is
easier than the XML file.

The strength of XML is not in highly regular data. XML is good for
semi-structured data with complex structure.

When you read such a complex data file like

P101999-10-2011Alice SmithS16123 Maple StreetMill Valley
CA0590952112Robert SmithP045354Old Town PA0595819P29Hurry, my
lawn is going wild!06872-AA09Lawnmower01106148.95P24Confirm this is
electricA06926-AA12Baby Monitor0110539.98AP101999-05-21

To be able to convert it to XML would be a big win

<?xml version="1.0"?>
<purchaseOrder orderDate="1999-10-20">
<shipTo country="US">
<name>Alice Smith</name>
<street>123 Maple Street</street>
<city>Mill Valley</city>
<state>CA</state>
<zip>90952</zip>
</shipTo>
<billTo country="US">
<name>Robert Smith</name>
<poBox>5354</poBox>
<city>Old Town</city>
<state>PA</state>
<zip>95819</zip>
</billTo>
<comment>Hurry, my lawn is going wild!</comment>
<items>
<item partNum="872-AA">
<productName>Lawnmower</productName>
<quantity>1</quantity>
<USPrice>148.95</USPrice>
<comment>Confirm this is electric</comment>
</item>
<item partNum="926-AA">
<productName>Baby Monitor</productName>
<quantity>1</quantity>
<USPrice>39.98</USPrice>
<shipDate>1999-05-21</shipDate>
</item>
</items>
</purchaseOrder>

And this is what this converter would like to be good at.
data_mechanic(at)yahoo(dot)com

*** Sent via Developersdex http://www.developersdex.com ***
Mar 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Albert Tu | last post by:
Hi, I am learning and pretty new to Python and I hope your guys can give me a quick start. I have an about 1G-byte binary file from a flat panel x-ray detector; I know at the beggining there...
22
by: kalio80 | last post by:
Hi everyone I am trying to create a file that converts text files from unix to windows and windows to unix I understand the general concept of it as unix uses line feed LF Windows uses CRLF...
5
by: john | last post by:
Here is the short story of what i'm trying to do. I have a 4 sided case labeling printer setting out on one of our production lines. Now then i have a vb.net application that sends data to this...
17
by: Arnold | last post by:
Is using fseek and ftell a reliable method of getting the file size on a binary file? I thought I remember reading somewhere it wasn't... If not what would be the "right" and portable method to...
7
by: Drake | last post by:
Well, I'm stuck in legacy land and I need a helping hand. We're trying to give some modern value-added functionality to a circa-1985 fortran proggie. The program produces a binary file, by...
0
by: Bonj | last post by:
hello this is a purely algorithmical question but if i have posted to an irrelevant group, apologies. can anyone point me at some good tutorials or info about the steps involved in creating a...
5
by: Sheldon | last post by:
Hi everyone, I have a short program the writes the output data to an acsii file: import sys import os import string import gisdata from Numeric import *
8
by: Ronin | last post by:
I'm very new to C++ coming in from using C# and the like. I've read a lot of good posts about binary files but I'm still missing a few key ingredients that will help me with the following problem....
6
by: i_robot73 | last post by:
I have a file, containing hex values for dates (MMDDYYYY)<status code><??such as: ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.