Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 3rd, 2005, 04:00 PM
steelvictim steelvictim is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 1 steelvictim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 42 sec
Reputation Power: 0
Decoding Base-64 in XML

Hi,

I'm trying to decode a portion of an XML feed which is supplied in Base64. I've tried using several custom VBscript functions provided by other developers, but to not avail. I think trying to manipulate the string in VB is probably not the way to go.

Below is the code I have, sans any conversion attempts:

Code:

Set xmldom = Server.CreateObject("Microsoft.XMLDOM")

'xmlhttp.responseText is the XML feed
xmldom.loadXML xmlhttp.responseText

Set objList = xmldom.getElementsByTagName("*")
For i = 0 to (objList.length - 1)
'the base64 encoding is stored in the "Image" node If objList.item(i).nodeName = "Image" Then
Response.Expires = 0 Response.Buffer = TRUE Response.Clear Response.ContentType = "image/gif" 'writing the binary information. since this is encoded in base64, it won't work as-is response.binaryWrite objList.item(i).text response.end() Exit For
End If
Next


I've attempted to use MSXML to accomplish this, but the only method I've seen used requires a file to be read from the server, and the resulting decoded file is written to the server. Unfortunately, I don't have much freedom on the server, so I'd like to accomplish this under the auspices of this script and the Response stream.

Reply With Quote
  #2  
Old August 4th, 2005, 12:53 AM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 9 m 23 sec
Reputation Power: 181
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Decoding Base-64 in XML


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT