how to track line number of a text file in coding?
-
I am creating an application in which i am parsing an XML file. I want to show that a certain XML Tag has error in the file on a certain line. How can I keep track of line number in file and show it to the user. How can i get line number through coding? Thanks, Sandeep S. Sekhon
-
I am creating an application in which i am parsing an XML file. I want to show that a certain XML Tag has error in the file on a certain line. How can I keep track of line number in file and show it to the user. How can i get line number through coding? Thanks, Sandeep S. Sekhon
You could start an int at 1 then everytime you read a line increment it?
-
You could start an int at 1 then everytime you read a line increment it?
but I m using XmlDocument to parse the XML. How can i keep the track of line number in that. Thanks, Sandeep S. Sekhon