titoo
Mar 29 2008, 10:10 PM
QUOTE The following options are supported in the DataDirect XML Converter CSV converter precisely because they are unspecified in the real world, and vary between applications.
Whether the first row of the CSV data contains the names of the fields, or they are known by the sending and receiving applications implicitly How commas within values are handled in CSV files How quotes within quoted values are handled in CSV files. Are they doubled to escape them, or is there a special escape character, such as a backslash? Whether single or double quotes are used Whether runs of consecutive but empty fields should be ignored What encoding is used — Windows1252, ISO-8859-1 or US-ASCII are the most common What line ending is used — CR/LF from Windows, LF from Unix/Linux, or CR from the Macintosh are often seen TSV Files A close cousin to CSV files are TSV, or Tab Separated Value files. These are a common export format from spreadsheets also. There is a separate DataDirect XML Converter for these, but it actually is just the CSV Converter in disguise, since either can be converted to the other by changing the definition of the separator character from comma to tab.
CSV Sample File Use the following sample CSV file for use in trying out DataDirect XML Converters:
Title,Author,ISBN13,Pages 1984,George Orwell,978-0451524935,268 Animal Farm,George Orwell,978-0451526342,144 Brave New World,Aldous Huxley,978-0060929879,288 Fahrenheit 451,Ray Bradbury,978-0345342966,208 Jane Eyre,Charlotte Brontë,978-0142437209,532 Wuthering Heights,Emily Brontë,978-0141439556,416 Agnes Grey,Anne Brontë,978-1593083236,256 Walden,Henry David Thoreau,978-1420922615,156 Walden Two,B. F. Skinner,978-0872207783,301 "Eats, Shoots & Leaves",Lynne Truss,978-1592400874,209
CSV File Reading and Writing Using the above file, a tiny Java, C# or VB.Net program can quickly transform the input CSV to XML, or convert XML to CSV. For example, the following Java program converts the above CSV sample file into XML and writes the output to the console.
import java.io.*; import javax.xml.transform.stream.*; import com.ddtek.xmlconverter.*; public class CSVDemo { public static void main(String[]args) throws Throwable { ConverterFactory factory = new ConverterFactory(); ConvertToXML toXML = factory.newConvertToXML("converter:CSV:first=yes"); OutputStreamWriter w = new OutputStreamWriter(System.out, "US-ASCII"); toXML.convert(new StreamSource(args[0]), new StreamResult(w)); } }
This would create the following output (with some parts removed).
<?xml version="1.0" encoding="US-ASCII"?> <table> <row> <Title>1984</Title> <Author>George Orwell</Author> <ISBN13>978-0451524935</ISBN13> <Pages>268</Pages> </row> ... <row> <Title>Jane Eyre</Title> <Author>Charlotte Brontë</Author> <ISBN13>978-0142437209</ISBN13> <Pages>532</Pages> </row> ... <row> <Title>Eats, Shoots & Leaves</Title> <Author>Lynne Truss</Author> <ISBN13>978-1592400874</ISBN13> <Pages>209</Pages> </row> </table>
XML to CSV Going from XML to CSV is just as important, and the code is just as small. It takes no special schema, and it doesn't even take XQuery or XSLT. Anything immediately under the root element becomes the rows, and anything under that becomes the values between the commas. In the above example, switching to the ConvertFromXML class and writing the sample XML in would produce the initial CSV file.
Just like the EDI converters and other converters in the DataDirect XML Converters suite, CSV (and TSV) converters are fully bidirectional.
How To Use CSV Files CSV files often are used as a bridge between older applications and newer ones. Having a tool that transparently reads and writes CSV format files in your toolbox can be very valuable. So whether you have to merge inventory data coming from an outside vendor into your database or publish a list of financial figures for your accountants, being able to bridge these two worlds is the purpose of the DataDirect XML Converters. You can get started with directly accessing CSV data from your Java or .NET applications by downloading a free trial of DataDirect XML Converters today.
Reply
yordan
Mar 30 2008, 01:04 PM
Hi, titoo. Please have a more careful look at our forum rules. One of these rule is usually named politeness, or scientifical honesty, or intellectual property respect. Please feel free repeating what somebody else said. But each sentence you did not write by yourself, you should mention the person who really said it, and put it between qutoes. For instance, when repeating what I just said, you should write don the following way. As Yordan said, QUOTE please be polite and honest For instance, your post is very interesting, I am glad to be informed about that. But you should have mentionned that it is coming from the site http://www.xmlconverters.com/csv/# Today I inserted the quotes for you in your post. Next time please use the "quote" button in order to insert the quotes by yourself. Else we could imagine that you are trying to cheat with our credit system, and this makes the admin's around here very angry. Regards Yordan
Reply
Recent Queries:--
generate xml with csv java - 13.23 hr back. (1)
-
how do you confirm a row in cvs format - 14.96 hr back. (1)
-
java code for converting csv to xml - 19.26 hr back. (1)
-
php xml to csv - 20.17 hr back. (1)
-
convert csv to xml php - 23.87 hr back. (1)
-
c# sample code to convert a csv file to xml - 25.93 hr back. (1)
-
sample c# program to convert from csv to xml using xslt - 27.11 hr back. (1)
-
vb.net xml convert escape characters - 34.98 hr back. (1)
-
linux convert tsv] - 35.72 hr back. (1)
-
xml to csv php - 36.89 hr back. (1)
-
java read csv file into xml - 37.62 hr back. (1)
-
create csv to xml file vbscript - 38.52 hr back. (1)
-
csv to xml sample program - 40.04 hr back. (1)
Similar Topics
Keywords : convert, csv, xml, options, supported
- Do I Need To Set Up Any Special Kernel Options To Enable Cd/dvd Burning?
CD / DVD Burning (0)
Guide For Beginner Convert Video To Psp
Video convert iPod iPhone (2) Guide for beginner how to convert WMV, ASF, WMA, AVI, RMVB, RM, RA, MOV ect to psp PSP Video Format
The video codec supported by the PSP is a proprietary variant of the H.264 codec closely related to
DivX. The format is also referred to as the Memory Stick Video Format. The audio codec used is AAC.
Before loading video onto your PSP it needs to be transcoded using one of the tools listed below.
Some compatible (Sony) devices may be able to produce video in the correct format, and therefore may
not require transcoding. The PSP manual states that the maximum supported ....
Share : How To Rip Dvd And Convert Video To Ipod Or Iphone Or Zune
ipod iphone zune (1) Hello all , I hope these messages can help you : Share:how to rip DVD and convert Video to
iPod at http://www.oursdownload.com/convert-DVD-vi...iPod-video.html Share:how to convert
dvd and video to iphone at http://www.oursdownload.com/dvd-to-iphone.html Share:how to
convert dvd and video to zune http://www.oursdownload.com/Zune-Video-Con...-converter.html ....
Convert To Ipod
(0) I have a song that is a Winamp Media file, but I need it to be an iPod compatible format. Is there
any program I can get to convert it for Vista? I've searched, but found only few. Tried to use
MelodyCan and it seems to be helpful. This software supports “any format that Windows media player
or QuickTime player can play”. I tried to convert nearly 25 files /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> with a trial-version and
it works! This trial is available here: http://www.convert-any-media.com/ ....
Dir2html 1.1.0
Convert a local directory to an HTML index with hyperlinks (4) With this freeware anybody can convert a local directory to an HTML index file with hyperlinks, it
is very useful for building file lists, cataloging contents of CD-ROMS, etc. for later browsing with
any browser. DIR2HTML can index either a single directory or multiple directories at once
recursively, so, with this option a separate index file is generated for each subdirectory under
your root directory. This program is very easy to use, do not use a lot of system resources and you
dont need to fill any form to download it, no spyware, adware, nags, and no time-expiry.....
Convert Video, Music, Images, Pdf And More
(2) Few things are more irritating than having to deal with a format that is incompatible with what you
need it to do. It doesn’t matter if it’s a media file, document, or shoe size; it’s just plain
frustrating. To make your life easier, check out this list of 101 tools that will allow you to
convert just about anything. http://www.cogniview.com/convert-pdf-to-ex...s-pdf-and-more/ ....
How To Convert A Kick Into A Goal?
(2) QUOTE You are a soccer goalkeeper, staring at an opponent about to take a penalty kick.
You've got a big space to defend, and you know the odds of blocking the kick are
slim–typically less than 20 percent. Wouldn't it be great if you could influence the
kicker's decision about which side of the net to aim at, so you'd be prepared to lunge in
that direction? Science to the rescue! A new study concludes that by standing imperceptibly
off-center, a goalie can nudge a kicker to kick toward the slightly larger space. Researchers at
the Univers....
VGA Mode Not Supported Message On Monitor
(9) Hi, I keep getting this VGA Mode Not Supported message on the LCD monitor whenever it tries to go
into Windows. I have read up on this online and it seems to be a problem with the refresh rate. The
problem is that I can't boot into Safe Mode to change the refresh rate to a lower setting
because it either freezes or also shows that VGA Mode message again. This is a Compaq that I'm
fixing for someone and they just have the 5 recovery discs that came with it. I tried putting the
first one in and selected to do the format and recover option. It goes through the reco....
How To Start A Program On Startup With Options
(11) Well as I;ve said before I'm new to linux, but am learning fast, I'm trying to figure out
how to add a program to start at fedora bootup, I need '/opt/lampp/lampp start' to start at
bootup, I beleive I need to do something in the init.d folder but I am unsure of what should be done....
Program To Convert M4p To M4a In Batches Quickly
(3) Hi, is there a quick method to convert a lot of m4p files to m4a? These songs were bought from
iTunes and are in the protected format. I want to covert a few thousand of these files to m4a in
batches as quickly as possible. Is this feasible? I know, it also depends on the processor my
machine has, but is there a known program out there that will do a speedier job than others?
Thanks.....
Rm Avi To Divx Avi ? How ?
How can I convert a RM avi movie to a DivX avie movie ? (7) How can I convert an avi file encoded with RM codecs (real media) to a DivX avi file ? I would like
to be able to read it on a stand-alone avi reader. Virtualdub says "cannot determine file type" and
Imtoo rm converter simply freezes, using no cpu and no disk.....
What Database Do You Use With PHP
Regarding PHP supported database format (5) There are different database backends supported by PHP. However, most of us probably use MySQL and
the books on PHP mostly use MySQL as the backend database. These are the currently supported
database format: 1. dBase 2. FrontBase (functional since DB 1.7.0) 3. InterBase (functional since
DB 1.7.0) 4. Informix 5. Mini SQL (functional since DB 1.7.0)6. Microsoft SQL Server (NOT for
Sybase. Compile PHP --with-mssql) 6. MySQL (for MySQL 7. MySQL (for MySQL >= 4.1) (requires PHP 5)
(since DB 1.6.3) 8.Oracle 7/8/9 9. ODBC (Open Database Connectivity) 10. PostgreSQL 11. SQL....
Would My Modem Be Supported ?
(6) Ok .. my question .. would linux support my ADSL modem ? .. i have suse installed on my laptop ..
but never had the guts to connect to the internet /biggrin.gif" style="vertical-align:middle"
emoid=":D" border="0" alt="biggrin.gif" /> .. fearing that my system might not be safe and tweaked
enuf to go on the WWW. Wouldent go full fledged unless i know my system right. I have never gone nor
bothered to see if my modem would install .. but in future .. if i need .. would it be possible ? ..
i own a lucent cell pipe 20A usb modem .. Regards Dhanesh.....
Automatic Options
(1) Hello everybody!!! I'm new to this list and to JavaScript too. As a freshman
I'd like to know if it's possible to solve the following problem: I have to access a page
where there are some combo boxes with many options and after choosing the right options I have to
click on a button to see the desired results (the combos' content is like a filter to a query).
The result is a table of values and this table is generated in HTML (I saw the page's source
code). The page I want to access is a php page and I don't know if it uses some dat....
How: Disable A Few Options In WinXP Limited A/c ?
(7) Where i work .. my PC is shared with a student club of my campus .. We use WinXP .. and i have made
my account as the Admin and theirs as Limited. I wanted to disable the following on the Limited
account: 1) Installation of any software 2) Disable Windows Media Player 3) Disable change of themes
or wallpaper etc 4) Disable changing time. 5) Disable the use of Windows Messenger ( tho they
shouldent be able to install MSN Messenger) 6) Disable the use of Internet in a way that they can
only use outlook to send and receive mails but not browse the inetrnet. 7) Last but no....
Update Your Nec Dvd Burner Fireware To Get Dvd-ram Supported
NEC ND-3550A to ND-4551A (0) We all know that DVD/CD writer can get more function and improve the quality of burning by updating
it firmware. NEC ND-3550A is an old model DVD writer. And it also is popular in the market. NEC
ND-4551A is an upgraded model of ND-3550A. The difference between these two models is newer model
support DVD-RAM burning and LabelFlash. In my point of view, it is not worthwhile to buy a new
model (ND4551A) just for DVD-RAM supported. There is a way to upgrade your NEC ND-3550A to ND4551A
by updating the firmware in just few steps. Step 1, First, you need to download....
Itunes And Your MP3 Player
Use Tunebite to convert files (2) My problem was with copy-protected song downloads. I paid for these songs, but my portable MP3
player wouldn't recognize the files. I have an iRiver, which doesn't like to play nicely
with the ".m4p" files that you buy from iTunes. It also hates WMA files, which were also
copy-protected and therefore a real pain in the butt to do anything with. The whole thing was
stupid. These are legally-obtained files, but they won't work anywhere but on my computer? How
does *that* discourage people from downloading illegally? So, I found Tunebite , a conversion
utilit....
Help: $_post Variable For Options From Select Types?
(6) I want to know if there is a way to get the variables in $_POST for the options (not just the
selected ones, but the unselected ones as well) of a type. Objective: Creating an application for
my school. Issue: I am successful in receiving all the variables from the forms except the ones
added to the options of a type. Just wanted to know what is the variable to access the options of
types. Here is what I am trying to do with it: View Page If the server is down or unable to
load file, here is the script: CODE <html> <head> ....
HTTPS - Supported Or Not?
(11) I'm writing this to ask if you support https or not. In
http://www.xisto.com/helpdesk/index.php?cmd=status , I found that not all server support this. I
need to know because I'm going to setup a forum that require https.....
Forum Admins: Convert Other Boards To phpBB Easily
(5) Hi every body. I have learnt something new...If you are using a kind of portal (vbulletin or others)
and you wanna transfer your database to phpbb you wanna convert your database to php. There are
variety of tools in www.phpbb.com for converting the database... Have a nice day.....
Is Lasso Supported At Astahost ?
(2) I am in a web design class at my school and for databases and server side functions we use Lasso. I
am interested in creating a free hosted website from AstaHost and I am not sure if Lasso is
supported by their free servers. My teacher told us that after we learn Lasso that it would be easy
to adapt to other languages like php, and I wondered if this is true or not.....
Does Anyone Know How To Convert .nsv Format?
(1) Does anyone know how to convert .nsv? If you don't know what .nsv is then I'll tell you!
QUOTE NSV Nullsoft (Streaming|S as in Soft) Video about NSV is a new video format. It is
designed to be easily streamed, support any audio and video codec, and be usable on nearly any
platform. Currently NSV utilizes MP3 for audio and VP3 for video. Support for more codecs will be
added soon. Source: NullSoft.com ....
Convert Fat32 To Ntfs Without Data Loss (dos-mode)
(5) Some computer's are sold with windows XP pre installed and with FAT32 FORMAT, so there is a way
to change it without data loss. Go do MS-DOS and type convert c: /fs:ntfs, dont forget to change
the drive c:\, d:\ , e:\ for the one that you wanna convert . PS : This process
is impossible to return to FAT32, once you convert you can't turn back , unless you format your
pc /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> cheers
m8's /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif'....
Mac <-> Pc <-> Opentype Font Conversion Utilities
Looking for freeware to convert fonts (0) I am looking for a freeware application to convert fonts between different formats. Mainly I need
one to convert Mac fonts to PC fonts and/or Opentype (new cross-platform format). I do alot of
freelance design work and work between Mac and PC alot, and the font issue is really becomming a
frustrating problem. I was using a trial version of the newest Crossfont and that worked perfectly,
but the trial ended. I suppose when I get some money I can buy Crossfont or Transtype, but for the
time being I really can't afford it. Does anyone know of a freeware application....
Trap17.net : Ad Supported Free Web Hosting!
Introducing Trap17.net! (11) Introducing Trap17.net! Ad supported Free Web Hosting! Xisto Corporation is proud to
announce new member in its Web Hosting family, Trap17.net. Trap17.com and Trap17.net will be
diffrent from each other. Ever since we started Trap17.com, We were observing our traffic and saw
Quite a large population of people returning back from main page which clearly expressed they were
looking out for hosting without spending time as well as money. Well, Trap17.net will be launched
targetted especially for this group. Every account will have a banner Ad on top and text ....
How To Remove Internet Options Features
(7) How to remove Internet (IE) Options features Click Start > Click Run > and type “regedit” (without
quote) and then click OK. Find and go to following key: HKEY_CURRENT_USER \ Software \
Policies \ Microsoft \ Internet Explorer Under Internet Explorer key create a new key and
name it “Control Panel”. To remove features, create any of the following strings under Control Panel
key. AdvancedTab = Advanced tab ConnectionsTab = Connections tab ContentTab = Content tab
GeneralTab = General tab ProgramsTab = Programs tab SecurityTab = Security tab And give....
Convert Currency Using Google
New feature (0) This is a great new feature from Google - in order to convert currency just type in the query as
follows: * 3.5 USD in GBP * currency of Brazil in Malaysian money * 5 British pounds
in South Korean money Quick and easy. I like it because one doesn't need to know the 3
character currency code; the natural language query is a great way to get work done faster. Other
new features are also listed on this page. ....
How To #4: Custom BBCodes For This Board (Pptions)
More than one of them (2) So far m^e has made us aware of two variables for custom BBcodes: {option} and {content}. But what
if you want to have multiple options for a tag, like, maybe foreground color and background color?
To do this all it takes is a simple php script. If you remember parameters from DOS, it is jsut one
list of words or symbols separated by spaces. Contrary to popular belief, this parameter list is
one large variable in a program that gets parsed into smaller variables. That is exactly what we do
for multiple options. As an example, I'm going to use a simple highlight....
Mac Mini
Will it convert Windows users? (27) Apple MAC Mini _________________ It seems like a good thing. The basic config. is only $499
and most of the stuf one would add is already in it. But just like a few other macs, it seems very
hard to upgrade if not impossible. Would it's low price bring more people into view of macs or
will it not sell much at all?....
Converting Flash Files To Gif
how to convert flash files to anim gif (7) i used swishmax to make simple flash animation. but then, i figured out for simple animations we
should use gif instead. this is to ensure wider compatibility with older browser or those who didnot
have flash installed (for security reasons, etc). so, anyone have a simple solution of coverting SWF
files to GIF files without compromising its quality?. thanks....
Looking for convert, csv, xml, options, supported
|
|
Searching Video's for convert, csv, xml, options, supported
|
advertisement
|
|