Questions tagged [textreader]
68 questions
2
votes
2 answers
Tab delimited txt file reading int value from string array
I am using TextReader to read in each line of a tab delimited file.
For each line that it reads I split on the tabs and populate a string array.
I can then access specific positions in the string array to get the values.
This works great for…

Baxter
- 5,633
- 24
- 69
- 105
1
vote
1 answer
NVelocity: "Cannot read from a closed TextReader"
Just getting started on NVelocity (v1.1.1) and it seems to be working just fine.
There's just one small thing that annoys me. I've set up VS2010 to break each time an exception is thrown even though it gets handled somewhere, and when running the…

bernhof
- 6,219
- 2
- 45
- 71
1
vote
1 answer
How to take data/text off a website and input it in my android app via text view, list view etc?
im trying to create an application where a page has its text created automatically by reading off a website?
I understand an array would be used and string formatting, i am ok with android programming but not an expert lol.
I had tried using a set…

Nazul Khan
- 11
- 1
1
vote
1 answer
Is there a maximum line-length in a textfile without a linebreak?
Trying to use StreamReader or similar from C# to read and write VERY LONG lines without the linebreak.
As I understand it, linebreak is still just 2 bytes (CR+LF) in a long bytearray called a file. At least thats how I am used to it in C/C++...
Is…

BerggreenDK
- 4,915
- 9
- 39
- 61
1
vote
3 answers
Count how many times certain words appear in a text with C#
I’m just so close, but my program is still not working properly. I am trying to count how many times a set of words appear in a text file, list those words and their individual count and then give a sum of all the found matched words.
If there are 3…

Aubrey Love
- 946
- 6
- 12
1
vote
1 answer
No EndOfStream check on TextReader
I found that this problem is not addressed in this knowledge base and decided to add the question and the answer to help others.
I am creating a TextReader to read through a text file line by line using ReadLine, which requires a termination check…

Roger Layton
- 1,573
- 2
- 13
- 12
1
vote
1 answer
Create Dataframe from pdf to csv based on string
I like to split information of a pdf document based on the presence of colon. A sample is here.
Updated PDF with four pages can be downloaded from this link
I am attempting the following. After reading the pdf, I am trying to split it by colon.…

S Das
- 3,291
- 6
- 26
- 41
1
vote
1 answer
How to import the entire content of a text file into Edit Text Box of Matlab GUI?
I have a text file (.txt) that I want insert all containing of it to Matlab GUI and show it in a text box. Sometimes this text box updates when I GUI open it so there isn’t a specified text in it. (It is like a help note for my GUI that has text,…

Eghbal
- 3,892
- 13
- 51
- 112
1
vote
3 answers
How to parse a text file?
Basically I need someone to help me or show me the code that will allow me to read a name and a price from a file i have called c1.txt.
This is what i already have.
TextReader c1 = new StreamReader("c1.txt");
if (cse == "c1")
{
…
user251106
1
vote
3 answers
Code for reading from a text file doesn't work
I am new to Java and it has all been self-taught. I enjoy working with the code and it is just a hobby, so, I don't have any formal education on the topic.
I am at the point now where I am learning to read from a text file. The code that I have been…

Rincewind
- 412
- 1
- 10
- 26
1
vote
1 answer
IFilter code with ReadLine() implemented?
Doers anyone know of an IFilter wrapper class that implements ReadLine().
I'm currently using this Code Project IFilter Wrapper which is excellent and inherits TextReader but it doesn't contain an implementation for ReadLine(). Having had a look at…

SteveB
- 1,474
- 1
- 13
- 21
1
vote
2 answers
convert TextReader to XmlReader
I have a function that gets TextReader I want to use it as `XmlReader:
private void myFunc(TextReader textReader)
{
XmlReader _xml;
_xml=?
}
Is there a way to convert TextReader to XmlReader?

Hodaya Shalom
- 4,327
- 12
- 57
- 111
0
votes
3 answers
XmlTextReader, reading childelements (or parent element?) of an element
EDIT: Switched from XmlTextWriter to XElement
I have a Player class, which has following variables:
static string Name;
static int Level;
static int Cash;
And I've saved them into a "Profiles.xml" file with XElement, it now looks like this:
…
user1632861
0
votes
0 answers
Text-Reader class
For java a program, there will be a 2D array entry in the text file, but the size of the array will not be determined. How can I create a reading class without library, so that the program runs stably at all given values?
I tried to make a dynamic…

atoantonio
- 1
- 1
0
votes
2 answers
How can I reasd text from text file while there are multiple line and generate a string so I can use it as sqlconnection string?
I have a config file which contain multiple lines.
DataBaseType =1
ServerName=LAPTOP-XXXX
Database=mydatabase
Connection Timeout=3000
User ID=sa
Password=sasa
ServerIp=xxxx:8083
ServiceType=http://
Backup Driver=D:\
Backup Folder=SWBACKUP
Database…

DIPANKAR
- 3
- 5