Print Page | Close Window

reading xml

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=3820
Printed Date: 30 March 2026 at 7:50am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: reading xml
Posted By: briandware
Subject: reading xml
Date Posted: 25 June 2003 at 9:33am
i have been looking at articles on xml, and they have been very helpful.
 
the one question i have is that when i attach to an xml file, it comes in with the hyphens (-) to collapse or expand the view.  when i take these out, it works great, but with these in, it does not work at all.  is there a way to have these stripped out on the import?  her is a sample of my code.  any help at all would be greatly appreciated.
 
thanks,
brian
 
Dim xmlObj, sql
Set xmlObj = Server.CreateObject("Microsoft.XMLDOM")
xmlObj.async = False
 
xmlUrl = "c:/inetpub/wwwroot/doe/xml/weather2.xml"
xmlObj.async=false 
 
xmlObj.load (xmlUrl)

if xmlObj.ParseError.errorCode = 0 then
 Dim day0h, day0l, day0s, day0d
 day0h = xmlObj.documentElement.childNodes(2).childNodes(0).text
 day0l = xmlObj.documentElement.childNodes(2).childNodes(1).text
 day0s = xmlObj.documentElement.childNodes(3).text
 day0d = xmlObj.documentElement.childNodes(4).text
else
 Response.write ("error reading data")
end if
 
Set xmlObj = Nothing


-------------
Brian Ware
www.datachameleon.com



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net