473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

? for string, inserting a vbcrlf every N characters, or improving the behavior of MSXML

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

May 24 '06 #1
1 1684

"Ken Fine" <ke*****@u.washington.edu> wrote in message
news:e5**********@gnus01.u.washington.edu...
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.


Try getting your problem with MSXML resolved by posting a more detailed
description of the problem you are having with it to the
microsoft.public.xml group. We'll try to help you out there.

I know of no limitiation with regard to MSXML and line lengths. XML doesn't
even have a concept of lines and like HTML is pretty much blind to them.
May 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jason | last post by:
When users fill out my text area field, there is a chance that there will be no line feeds or cariage returns or spaces and just one really long word. THIS CAUSES A MAJOR PROBLEM! What I am trying...
14
by: Miranda | last post by:
Hi, I have a ASP/vbscript program that generates random passwords. The problem is I need to insert those passwords into an Access database of 327 clients. I have the random password program...
4
by: K | last post by:
I've an XML file in UTF-8. It contains some chinese characters ( both simplified chinese and traditional chinese). In loading the XML file with MSXML parser, I used the below code to retrieve...
35
by: Cor | last post by:
Hallo, I have promised Jay B yesterday to do some tests. The subject was a string evaluation that Jon had send in. Jay B was in doubt what was better because there was a discussion in the C#...
5
by: Drygast | last post by:
I've got at form where I insert some information to a string ( oMed ) using a inputbox. I would like to alter the string so that a vbcrlf is inserted into the string every 50 charachters or so....
2
by: Trint Smith | last post by:
I need to store an entire html file in a string and not call it from a file. Is that possible?? How can I do this?? with rows double quotes and all...It needs to be something like this: Dim...
8
by: Joe Reynolds | last post by:
say i have a string that is "hello this is my string and i like it very much" and i want to insert a newline at every 20th character, how could i go about doing this?
1
by: kellysgirl | last post by:
Now what you are going to see posted here is both the set of instructions I was given..and the code I have written. The instructions I was given are as follows In this case, you will create...
11
by: coomberjones | last post by:
I have a few std::strings that I am using to store raw binary data, each of which may very well include null bytes at any point or points. I want to slap them together into a single string, so I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.