Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / May 2005

Tip: Looking for answers? Try searching our database.

XMLHTTPRequest object Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Elizabeth Harmon - 13 May 2005 00:38 GMT
Good Evening,

 I am new to the XMLHTTPRequest Object and it's use but i am doing pretty
good with it since it's realtively simple?
I am having one problem in using a Get method.

 I am requesting an aspx file that contains some controls, intersoft Web
Combo to be exact. This control is a drop downlist control that renders it's
contents in an XML file structure. When i do a
XMLHTTPRequest("GET",URL,true), the response text is sent back but there are
backslashes next to all the double quotes the control produces for it's own
content. I tried a RegEx approach to striping out the \\"/g then replace
with " it replaces fine but when i try to replace the " back to
double quotes, the html in the response text looks like the original text
that i had alread stripped out.???? I have no control over the double quote
or the backslash it seems. The controls dont function properly with the
" that's why i do a regex back. I basically just want all backslashes
out of the ResponseText.

My Regex Expression is /\\/g or \\"/g

  Is this a function of the XMLHTTPRequest.Response.text that it seems to
be escaping with a \ all double quotes it finds?
How can i correct this so i can use the XMLHTTPRequest Object to just return
aspx pages that have these controls on it?
the Content type is set to text/xml, i am using IE6 on an intranet.

Please Help i am swiftly going bald over it and i didnt look good with hair
anyway, imagine what Bald will do to my dating rituals?

TIA
Alex Krawarik [MSFT] - 25 May 2005 18:36 GMT
> Good Evening,
>
[quoted text clipped - 25 lines]
> Please Help i am swiftly going bald over it and i didnt look good with
> hair anyway, imagine what Bald will do to my dating rituals?

Hi Elizabeth,

In a word, no, it's not XMLHTTPRequest that is padding your response text
with the back slashes. The responseText is simply the stream that is sent
back from the Web server, XMLHTTP does not alter response body at all - its
just not that smart...it would mean parsing the content and understanding
it. (To verify this you can simply request the same page using WinHTTP, and
compare the response you get back to that of XMLHTTP.)

I am not familiar with Intersoft Web Combo, but it sounds like the control
itself is emitting that content, and that web browsers are permissive enough
to render it correctly?  Now, if your response content is well-formed XML,
you could simply access the responseXML property to get a DOMDocument...but
it sounds like you are doing HTTP / HTML stuff.?

In that case MSXML is just overhead for you, you should use WinHTTPRequest.
Its API is very similar, and it does not incur the same XML processing
overhead that MSXML does.

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.