K
Ken Fine
I'm using ASP VB. I want to insert a VbCr or a VbLf into a declared string
every N characters. FWIW, I want to do this because of an apparent
limitation in MSXML2, which I am using to "scrape" data from webpages that I
control: I'm getting spurious exclamation points (!) where line lengths are
too long. Manually inserting line breaks (which do not render in HTML) seems
to solve the problem.
If I cannot figure out what's wrong with MSXML (or however I'm misapplying
it in my app), I need to flesh out the following pseudocode:
Dim myString, myCursorPosition, myIncrement
myString ="The quick brown fox jumped over the lazy dog."
myCurrentCursorPosition=0
myIncrement=5 ' I want a line break for every myIncrement
While [there are still remaining characters to walk through in the string
' navigate cursor by myIncrement through myString
...
' insert a VbLf at myCurrentCursorPosition
...
myCurrentCursorPosition = myCurrentCursorPosition + myIncrement
[loop]
Thanks for any help on the syntax here, or on an MSXML fix.
-KF
every N characters. FWIW, I want to do this because of an apparent
limitation in MSXML2, which I am using to "scrape" data from webpages that I
control: I'm getting spurious exclamation points (!) where line lengths are
too long. Manually inserting line breaks (which do not render in HTML) seems
to solve the problem.
If I cannot figure out what's wrong with MSXML (or however I'm misapplying
it in my app), I need to flesh out the following pseudocode:
Dim myString, myCursorPosition, myIncrement
myString ="The quick brown fox jumped over the lazy dog."
myCurrentCursorPosition=0
myIncrement=5 ' I want a line break for every myIncrement
While [there are still remaining characters to walk through in the string
' navigate cursor by myIncrement through myString
...
' insert a VbLf at myCurrentCursorPosition
...
myCurrentCursorPosition = myCurrentCursorPosition + myIncrement
[loop]
Thanks for any help on the syntax here, or on an MSXML fix.
-KF