Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 13th, 2004, 08:31 PM
Registered User
 
Join Date: Jan 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to read tags?

I am using the following code to read a XML file & write down its entire contents.

if fso.FileExists(sFname) then
  Set tso = fso.OpenTextFile(sFname, 1, False)
  Application(sVarName) = tso.ReadAll()
  Response.Write Application(sVarName)
end if


But if the file contains "<book><bname>Programming in C</bname></book>,
the sVarName only contains "Programming in C" and doesn't contain the tags.
 What shud I do to get the file contents as is?
  #2 (permalink)  
Old January 14th, 2004, 02:07 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

If you look at the source, I believe you'll see the tags. The problem is that the browser is ignoring the xml tags because they don't mean anything in HTML.

Response.Write Server.HtmlEncode(Application(sVarName))

Peter
------------------------------------------------------
Work smarter, not harder.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Names within tags ? tjclifford XSLT 3 June 10th, 2008 08:33 AM
Read Only Form Is not Read only lryckman Access VBA 3 June 12th, 2007 06:30 AM
VBA Formatting cells with Html tags read from XML hemagiri Excel VBA 0 November 22nd, 2006 02:41 AM
Meta tags Adam H-W HTML Code Clinic 2 November 19th, 2003 11:25 AM
Junk tags kilika Forum and Wrox.com Feedback 2 June 30th, 2003 04:57 PM



All times are GMT -4. The time now is 02:29 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.