Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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

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))

Work smarter, not harder.

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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.