473,569 Members | 2,402 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(a t)yahoo(dot)com

*** Sent via Developersdex http://www.developersdex.com ***
Mar 26 '06 #1
1 1802
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,Terr y Gilliam and Terry Jones
Monty Python's Life Of Brian,1979,Terr y 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>19 71</releaseDate>
<director>Ian MacNaughton</director>
</movie>
<movie>
<title>Monty Python And The Holy Grail</title>
<releaseDate>19 75</releaseDate>
<director>Ter ry Gilliam and Terry Jones</director>
</movie>
<movie>
<title>Monty Python's Life Of Brian</title>
<releaseDate>19 79</releaseDate>
<director>Ter ry Jones</director>
</movie>
<movie>
<title>Monty Python Live At The Hollywood Bowl</title>
<releaseDate>19 82</releaseDate>
<director>Ter ry Hughes</director>
</movie>
<movie>
<title>Monty Python's The Meaning Of Life</title>
<releaseDate>19 83</releaseDate>
<director>Ter ry 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
CA0590952112Rob ert SmithP045354Old Town PA0595819P29Hur ry, my
lawn is going wild!06872-AA09Lawnmower01 106148.95P24Con firm 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"?>
<purchaseOrde r 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>Hurr y, my lawn is going wild!</comment>
<items>
<item partNum="872-AA">
<productName>La wnmower</productName>
<quantity>1</quantity>
<USPrice>148.95 </USPrice>
<comment>Confir m this is electric</comment>
</item>
<item partNum="926-AA">
<productName>Ba by Monitor</productName>
<quantity>1</quantity>
<USPrice>39.9 8</USPrice>
<shipDate>199 9-05-21</shipDate>
</item>
</items>
</purchaseOrder>

And this is what this converter would like to be good at.
data_mechanic(a t)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
2021
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 is a 128-byte header and the rest of the file is integers in 2-byte format. What I want to do is to save the binary data into several smaller files
22
2055
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 carrige return and feed line my program will prompt the user to enter a file to open and then prompts for a destination file to save the new formatted...
5
3339
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 printer using a RawPrinterHelper class that i found I believe in the msdn. the class works wonderfully when I send stright text data (in the...
17
15958
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 obtain it? Thanks.
7
1868
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 itself no problem... each record needs to be converted into std::vector<mystruct> I'm having a helluva time with the binary-->(pod)datatype conversion....
0
2010
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 high-end generic binary tree (or, ternary search tree). The basic method I've got at the moment is having a resource file containing a series of data...
5
4797
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
4117
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. I have a binary file that has a specific number of floats per row. I need to read each float into a float array for processing by another block...
6
3376
by: i_robot73 | last post by:
I have a file, containing hex values for dates (MMDDYYYY)<status code><??such as: 303530313230303102003035303232303031020030353033323030310200303530343230303102003035303732303031020030353038323030310200 breaking that down: 30353031323030310200 30353032323030310200 30353033323030310200
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7679
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.