B
Bill
I am developing an api that provides methods for reading and
extracting text in text files that have a very structured format.
There are various Read methods for reading lines, paragraphs and
specific content sections by heading name. I want to provide a
ReadSubSection method that can read a subsection and it would work
somewhat like the ReadSubTree method of the XmlReader class.How can
that be done? It should return a new instance of the Read class,
similar to what happens with ReadSubTree. I tried having the
ReadSubSection method return a new instance of its own class, but that
results in the class fields being reinitialized which messes up the
instance created by the user of the api. How does the XmlReader work
internally when ReadSubTree is called? Can a class spawn an instance
of itself without interferring with user created instances?
extracting text in text files that have a very structured format.
There are various Read methods for reading lines, paragraphs and
specific content sections by heading name. I want to provide a
ReadSubSection method that can read a subsection and it would work
somewhat like the ReadSubTree method of the XmlReader class.How can
that be done? It should return a new instance of the Read class,
similar to what happens with ReadSubTree. I tried having the
ReadSubSection method return a new instance of its own class, but that
results in the class fields being reinitialized which messes up the
instance created by the user of the api. How does the XmlReader work
internally when ReadSubTree is called? Can a class spawn an instance
of itself without interferring with user created instances?