there are several methods:
1)
create the file DynamicXml.asp
create the file DynamicXmlReader.asp
------------- DynamicXml.asp -----------------
create the DB connection and start writing the contents like
Response.ContentType = "text/xml"
response.write "<?xml version=""1.0""?>"
response.write "<root>"
response.write "<" & db("Headerfield1") & "/>"
response.write "<" & db("ContentField1") & "/>"
response.write "<" & db("ContentField2") & "/>"
response.write "<" & db("ContentField3") & "/>"
response.write "</" & db("Headerfield1") & ">"
response.write "</root>"
close the DB connection
-------------- DynamicXmlReader.asp ---------------------
set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
xmlHttp.Open "POST", "http://mysite.com/dynamicxml.asp", False
xmlHttp.Send
strXml = xmlHttp.responseXML
set xmlhttp = nothing
Set XmlDoc = Server.CreateObject("Microsoft.XMLDOM")
XmlDoc.async=false
XmlDoc.load(strXml)
----------------------------------------------------------------------------
--------------------------------
2)
Create the file DynamicXml.asp
create the DB connection as strart writting the contents like this
strXml = "<root><" & db("headerfield1") & "><" & db("ContentField1") & "/><"
& db("ContentField2") & "/>"
strXml = strXml & "<" & db("ContentField3") & "/></" & db("headerfield1") &
"></root>"
Set XmlDoc = Server.CreateObject("Microsoft.XMLDOM")
XmlDoc.async=false
XmlDoc.load(strXml)
------------------------------
Hope this helps
regards
remie bolte
----- Original Message -----
From: "Salvatore Palmisano" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Wednesday, October 09, 2002 4:51 PM
Subject: Dynamic XML
> My first foray into creating XML (an rss feed, actually).
>
> I have all of the asp code to extract the data I want from the db, but
> how does one include this dynamic content into an xml file? I tried
> creating the <% asp code %> inline, but that's obviously not allowed in
> the xml code.
> I searched through 15 Seconds.com for "dynamic xml" and came up with a
> variety of tools and application links...but Id much rather write
> something myself.
>
> Can anyone shove me in the right direction regarding this?
>
> .Salvatore Palmisano
> http://palmisanonet.com/
>
>
> ---
> You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]