473,403 Members | 2,354 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,403 software developers and data experts.

Text Parser - how to

I am a very beginner in c. I have to write a text parser to parse a
file with certain fields, a special delimiter.

This file may be in network, and may have to acces from the network.
Any help

Sep 20 '06 #1
6 1950
hi...
what is the delimiter... what is the format in which the file is to be
written...be specific.... people will help only if u be specific ...
pritywiz wrote:
I am a very beginner in c. I have to write a text parser to parse a
file with certain fields, a special delimiter.

This file may be in network, and may have to acces from the network.
Any help
Sep 20 '06 #2
pritywiz wrote:
I am a very beginner in c. I have to write a text parser to parse a
file with certain fields, a special delimiter.
Then you better get busy. Since your requirements are so secret it
looks like you best write some code and then show us.
This file may be in network, and may have to acces from the network.
Any help
Start simple. Leave networking out of it for now, and just concentrate
on your logic against a test file.
Sep 20 '06 #3
At the moment I really dont know, but wanted to give an initial start,
actually I am a PHP programmer and have done such parsing a lot.

But currently we have a requirement in C. I just want you all to give
me a beginner link or a basic code how to achieve this.

For example, if I have an attribute value pair data with each attribute
and value separated by '-' dash and the pair separated by a
semicolon';' and each new record in a new line.

Then if I want this in a database table -- which is also a task after I
parse the text, I should be able to do it.

Prity
ra*******************@gmail.com wrote:
hi...
what is the delimiter... what is the format in which the file is to be
written...be specific.... people will help only if u be specific ...
pritywiz wrote:
I am a very beginner in c. I have to write a text parser to parse a
file with certain fields, a special delimiter.

This file may be in network, and may have to acces from the network.
Any help
Sep 20 '06 #4
ra*******************@gmail.com wrote:
hi...
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html>
Sep 20 '06 #5
pritywiz wrote:
At the moment I really dont know, but wanted to give an initial start,


Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or:
<http://www.caliburn.nl/topposting.html>
Sep 20 '06 #6
iuz
pritywiz wrote:
At the moment I really dont know, but wanted to give an initial start,
actually I am a PHP programmer and have done such parsing a lot.

But currently we have a requirement in C. I just want you all to give
me a beginner link or a basic code how to achieve this.
if you are familiar to PHP.. ask yourself how PHP parses php files?
but i think that you need a simple parser so try to write some code and then
come back..

--
www.iuz-lab.info
Sep 21 '06 #7

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

Similar topics

2
by: Nebojsa Topolscak | last post by:
Hello, I wrote application which doesn't use graphic at all. One part of application needs Parser class from javax.swing.text.html.HTMLEditorKit. The ridiculous fact is when I try to...
0
by: Himanshu Garg | last post by:
Hello, I am using HTML::Parser to extract text from html pages from http://bbc.co.uk/urdu/ However the encoding of the input text seems to change to some unknown encoding in the output. The...
27
by: Eric | last post by:
Assume that disk space is not an issue (the files will be small < 5k in general for the purpose of storing preferences) Assume that transportation to another OS may never occur. Are there...
1
by: Eileene Cordoves | last post by:
hi i'm a newbie in xml and we're using org.apache.xerces.parsers.SAXParser. anyone know what the invalid characters in xml are? one of the value in the parsed xml is '<space><space>1', we...
1
by: google | last post by:
It would seem that when I assign an HTML entity to a form text input using "inline" javascript that it will display properly. But when trying to set it via a function call, the entity text shows...
2
by: Mattias Thuresson | last post by:
I want to convert a text based protocol into XML, using C#, how do I do that in the best maner ? Can I use XSLT in any way ? or do I have to make an parser that converts the file manually ? An...
3
by: matofarides | last post by:
Hello all! I was wondering whether there was a way, using any XML parser (preferably xerces), to create an XML file by reading, line by line a text file. Thank you, Marios Tofarides
9
by: Alex Buell | last post by:
I have a small text file which consist of the following data: ]] And the code I've written is as follows: ]] The trouble is, I can't work out why it goes into an infinite loop reading the...
2
by: David Virgil Hobbs | last post by:
Loading text strings containing HTML code into an HTML parser in a Javascript/Jscript I would like to know, how one would go about loading a text string containing HTML code, so as to be able to...
13
by: sonald | last post by:
Hi, Can anybody tell me how to change the text delimiter in FastCSV Parser ? By default the text delimiter is double quotes(") I want to change it to anything else... say a pipe (|).. can anyone...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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
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...

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.