Questions tagged [fileparsing]
170 questions
0
votes
2 answers
What is the best file parsing solution for converting files?
I am looking for the best solution for custom file parsing for our enterprise import routines. I want to basically change one file format into a standard file format and have one routine that imports that data into the database. I need to be able to…

Ryan
- 3
- 3
0
votes
1 answer
Modify XML File in C++
I want to modify an XML file which has a very complicated structure something like
text
text
....
I tried to use tinyxml and it is good but there are some comments in the source…

Poka Yoke
- 373
- 3
- 8
- 27
0
votes
4 answers
Parsing text file separated by comma
I am developing an application to read a text file and plot a graph. the text file will be something like
#Pattern Name Item1, Item2, Item3, gx1, gy1, gz1
115, 80, 64, 30.752, 27.587, 15.806
195, 151, 130, 108.983, 102.517, 66.353
94, 123, 156,…

Zigma
- 529
- 6
- 37
0
votes
2 answers
Cache data for post requests on server startup
I have a large CSV file which needs to be parsed in order to make post requests to a REST API.The post request body is a json string. The first line in the file has keys and following lines are the values, e.g.
FirstName,LastName
John,Doe…

pup784
- 533
- 3
- 5
- 15
0
votes
1 answer
Please help me with this program to parse a file into an XML file
To parse an input text file and generate a) an XML file and b) an SVG (also XML) file.
The input text file (input.txt) contains the description of a number of produce distribution centers and storage centers around the country. Each line describes…
user183372
0
votes
5 answers
String Parse C# to array/SQL database
I have a bunch of files in the format following like this:
20130201:14:58:47 I search: xx ('ID'= (xxxxxxxx) )
20130201:14:58:56 I request: search | For ID | Search
20130201:14:58:56 I search: xx ('ID'= (xxxxxxx) )
Is there something in C# like…

B-M
- 1,231
- 1
- 19
- 41
0
votes
1 answer
How do I extend a perl source file header parser to keeps existing information?
I have an existing project that requires license headers to be used at the beginning of every source file. The problem is that the license header is not static:
#+======================================================================
# \$HeadURL…

KevinM
- 567
- 4
- 21
0
votes
2 answers
IOError when trying to open existing files
I have a small issue with a python program that I wrote to extract some information from a special text file. The loop (code below) needs to execute my function extract_zcoords() over 500 files (1 file gives one list) so that I can build a dataset.…

Spyros
- 249
- 1
- 3
- 15
-1
votes
1 answer
how to match a multiline section in a file and delete it using regex in Python?
I have an INI file with sections mentioned within [ ] and variables in a key = value manner.
In it, I have a section called [FILES] which only has some file (with .ini extension) paths mentioned under it without any key-value pair.
Using…

A.G.Progm.Enthusiast
- 846
- 14
- 29
-1
votes
2 answers
Read a file, drop text fields, keep numeric ones
I want to write a little python script to plot some .dat files. For that I need to process the files first. The .dat file looks like this:
(Real64
(numDims 1)
(size 513)
(data
[ 90.0282291905089 90.94377050431068 92.31708247501335…

F.H
- 3
- 2
-1
votes
1 answer
In Ruby Compare 2 lines in a log file which BOTH contain the SAME "WORD" but ONLY print out the line that was written LASTLY
here are sample lines
Apr 9 11:53:26 skip [2244]: [2244] ab-cd-ef:cc [INFO] A recoverable error has occurred
some other log lines ..
....
Apr 9 12:53:26 skip [2244]: [2244] ab-cd-ef:cc [INFO] A recoverable error has occurred
now the LATEST line…

kamal
- 9,637
- 30
- 101
- 168
-1
votes
1 answer
How to match phone number prefixes?
I am analyzing data with phone numbers which I need to match to the country and the operator. I have received the country and destination (city/operator) mappings of the phone numbers prefixes in the following form:
Country, Destination, Country…

sfactor
- 12,592
- 32
- 102
- 152
-1
votes
2 answers
Problems parsing a file in C
I'm trying to parse a set of files that all have the same format. Here's an example instance:
NAME: br17
TYPE: ATSP
COMMENT: 17 city problem (Repetto)
DIMENSION: 17
EDGE_WEIGHT_TYPE: EXPLICIT
EDGE_WEIGHT_FORMAT: FULL_MATRIX
EDGE_WEIGHT_SECTION
…

Tam Coton
- 786
- 1
- 9
- 20
-2
votes
1 answer
Reading IBM floating-point in C++
I have a a binary file format with a bunch of headers and floating point data. I am working on a code that parses the binary file. Reading the headers was not hard but when I tried to read the data I ran into some difficulties.
I opened the file and…

timko.mate
- 364
- 1
- 3
- 13
-2
votes
1 answer
Fileparsing in C
I have a file and I want to read the content of this file line by line with fgets(). There are 10 lines in this file. Each line should contain amongst other things either the word "day" (occurs 5 times in file) or the word "night" (occurs 5 times in…

johnnydas
- 3
- 2