473,834 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting Delimited Text File into XML

Hello

I want to convert a huge delimited text file (of appr 85MB) directly into XML. I dont want to loop through the text file and write as xml, as it is very large file and taking much time. Can any one help me, how to convert

Thanks in advance for all your help

Best Rgds
Padmaja.
Nov 12 '05 #1
10 7066
Given that you have access to a db that can return result sets in XML, you
might want to try to import the csv to a temporary table and then query the
table whos output is XML.

"Padmaja" <an*******@disc ussions.microso ft.com> wrote in message
news:F2******** *************** ***********@mic rosoft.com...
Hello,

I want to convert a huge delimited text file (of appr 85MB) directly into XML. I dont want to loop through the text file and write as xml, as it is
very large file and taking much time. Can any one help me, how to convert ?
Thanks in advance for all your help.

Best Rgds,
Padmaja.

Nov 12 '05 #2
Thanks solex, can you tell me how to convert csv to a temp. table

Rgds
Padmaj

----- solex wrote: ----

Given that you have access to a db that can return result sets in XML, yo
might want to try to import the csv to a temporary table and then query th
table whos output is XML

"Padmaja" <an*******@disc ussions.microso ft.com> wrote in messag
news:F2******** *************** ***********@mic rosoft.com..
Hello
I want to convert a huge delimited text file (of appr 85MB) directly int XML. I dont want to loop through the text file and write as xml, as it i
very large file and taking much time. Can any one help me, how to convert Thanks in advance for all your help
Best Rgds

Padmaja


Nov 12 '05 #3
Padmaja,

Unfortunately this all depends upon your database. For instance SQL server
supports XML but MS Access does not, if you have SQL server you might want
to do some research on XML and importing or check some of the SQL Server
news groups. In addition I found this resource via google which may help:

http://weblogs.asp.net/kaevans/archi...4/17/5780.aspx

For others resources check:
http://www.google.com/search?q=CSV+t...utf-8&oe=utf-8

Regards,
Dan

"Padmaja" <an*******@disc ussions.microso ft.com> wrote in message
news:74******** *************** ***********@mic rosoft.com...
Thanks solex, can you tell me how to convert csv to a temp. table?

Rgds,
Padmaja

----- solex wrote: -----

Given that you have access to a db that can return result sets in XML, you might want to try to import the csv to a temporary table and then query the table whos output is XML.

"Padmaja" <an*******@disc ussions.microso ft.com> wrote in message
news:F2******** *************** ***********@mic rosoft.com...
> Hello,
>> I want to convert a huge delimited text file (of appr 85MB) directly into
XML. I dont want to loop through the text file and write as xml, as it is very large file and taking much time. Can any one help me, how to

convert ? >> Thanks in advance for all your help.
>> Best Rgds,

> Padmaja.


Nov 12 '05 #4
Padmaja wrote:
I want to convert a huge delimited text file (of appr 85MB) directly into XML. I dont want to loop through the text file and write as xml, as it is very large file and taking much time. Can any one help me, how to convert ?


Just use XmlCsvReader. See
http://msdn.microsoft.com/XML/XMLCod...lcsvreader.asp

--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com
Nov 12 '05 #5

Thanks alot, Oleg Tkachenko. I have a question for you...how fast is this i.e. Any idea of how much time will it take for an 85MB Csv file to convert into Xml file

Best Rgds
Padmaj

----- Oleg Tkachenko [MVP] wrote: ----

Padmaja wrote
I want to convert a huge delimited text file (of appr 85MB) directly into XML. I dont want to loop through the text file and write as xml, as it is very large file and taking much time. Can any one help me, how to convert


Just use XmlCsvReader. See
http://msdn.microsoft.com/XML/XMLCod...mlcsvreader.as

--
Oleg Tkachenko [XML MVP, XmlInsider
http://blog.tkachenko.co

Nov 12 '05 #6
Is this XmlCsvReader class present in system.xml of VS.Net 2003?

Thanks
Padmaja

----- Oleg Tkachenko [MVP] wrote: ----

Padmaja wrote
I want to convert a huge delimited text file (of appr 85MB) directly into XML. I dont want to loop through the text file and write as xml, as it is very large file and taking much time. Can any one help me, how to convert


Just use XmlCsvReader. See
http://msdn.microsoft.com/XML/XMLCod...mlcsvreader.as

--
Oleg Tkachenko [XML MVP, XmlInsider
http://blog.tkachenko.co

Nov 12 '05 #7
Padmaja wrote:
Thanks alot, Oleg Tkachenko. I have a question for you...how fast is this i.e. Any idea of how much time will it take for an 85MB Csv file to convert into Xml file?


Using XmlCsvReader - not much I think. XmlCsvReader is XmlReader, so
it's non-caching, forward-only aka fast.

--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com
Nov 12 '05 #8
Padmaja wrote:
Is this XmlCsvReader class present in system.xml of VS.Net 2003?


Nope.
You need to download XmlCsvReader and rebuild it as dll (it's exe by
default) to make use of it. See detailed description at
http://www.tkachenko.com/blog/archives/000086.html

--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com
Nov 12 '05 #9
Thanks Oleg, I got that done successfully

----- Oleg Tkachenko [MVP] wrote: ----

Padmaja wrote
Is this XmlCsvReader class present in system.xml of VS.Net 2003?


Nope
You need to download XmlCsvReader and rebuild it as dll (it's exe by
default) to make use of it. See detailed description at
http://www.tkachenko.com/blog/archives/000086.htm

--
Oleg Tkachenko [XML MVP, XmlInsider
http://blog.tkachenko.co

Nov 12 '05 #10

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

Similar topics

3
7036
by: Ben | last post by:
Hi all - I am having a bit of trouble and thought maybe someone in this group could shed some light. Here's the skinny... I am creating an automated process to import a bunch of text files into Access. I want to avoid creating a separate "Spec" for each file (there are over 180 files) and instead want to code my own dynamic importing rules. So far it's been going fine, except for one item...
1
3684
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am trying to avoid this extra step. can access read in this file directly into a table as append data? thank you very much for any pointers
1
11196
by: The Bear | last post by:
I have populated a dataset with a tab delimited text file. When the changes are made in the dataset, I then want to write those changes from the dataset to a tab delimited text file. How do I write each record to that text file. If anyone one knows I would really appreciate the help TB
0
1825
by: TJS | last post by:
attempting to read a delimited text file into a dataset using oledb text file connection getting this error message when trying to open connection ---------------------------------------------------- System.Data.OleDb.OleDbException: No error information available: E_NOINTERFACE(0x80004002). ---------------------------------------------------- I have the schema.ini file in the folder with the delimited text file
3
2440
by: Joe Fisherman | last post by:
I have used regex to parse a huge text file, and grab a tab delimited portion of it. I often use comma delimited text files, and use Jet Oledb4. I read that I would need an ini if the file wasn't comma delimited - if this is true, I am not sure of the easiest process to create an ini. The string has a header. My string looks like: "Call" "Date" "Time" "Call Period" "From" "Call Type" "Number Called" "To" "Call Length" "Local Airtime...
9
3642
by: Bernie Yaeger | last post by:
Is there a way to convert or copy a .xml file to a comma delimited text file using vb .net? Thanks for any help. Bernie Yaeger
0
1684
by: Masa Ito | last post by:
I have pipe delimited (and comma/tab) files that I read with JET using a schema file. Occasionally a field has multiple quotes (") inside a single field - which chokes the line (the rest of the columns get read as nulls). An example of an offending line is: J" Invalid " .... This is a text field that is between the two 'pipes' so I need it read exactly as is. I have reverted to schema files, trying everything I can to overcome this...
1
8192
by: Fordraiders | last post by:
vb.net 2003 Office 2003 What I have: C:\TestData\Input.txt Text File Pipe Delimited : 4 columns Of data example: 00001|NO BRAND NAME ASSIGNED|6DU27|M3-.5 X 6 FLAT HD SOCKET CAP SCREW, CL10.9, ALLOY STEEL 00002|NO BRAND NAME ASSIGNED|6DU28|M3-.5 X 8 FLAT HD SOCKET CAP SCREW,
6
22571
by: =?Utf-8?B?UmljaA==?= | last post by:
'--this code works but only reads text into one column when contains multiple cols Dim ds1x As New DataSet Dim ConStr As String = _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dir1A\;Extended Properties=""Text;HDR=No;FMT=Delimited\""" Dim conn1x As New OleDb.OleDbConnection(ConStr) Dim dax1 As New OleDbDataAdapter("Select * from testabc1x.txt", conn1x)
0
9800
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9651
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10225
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7762
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6960
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5629
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4429
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
2
3987
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3085
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.