Jump to content

XML in ASP/Javascript


@bc
 Share

Recommended Posts

hello evryone! i'm trying to generate an xml file using asp.. the case is:i'm reading data from database.. and then, i should write or put the data into an xml file.. how to generate xml file using asp? how to write the data in the xml file using asp? how to create the xml file in asp? hope someone can help.. tQ!

Link to comment
Share on other sites

@bc,You may find what you're after here:XML on the Server-Getting XML from a DatabaseLet us know if you have questions,

Dear hacknsack,tQ! by the way i still didnt gt it work! i'm doing something like this:- Let say i have an ASP file called createXML.asp- The file should create or generate an XML file called abc.xml- It also should read the data from Dbase and write/put it in abc.xml.- So, let say the createXML.asp file will do: select * from book. Then, all the data from the table 'Book' will be written in abc.xml not in createXML.asp.:)
Link to comment
Share on other sites

Since you are using asp which can read the database why would you require a static xml file?Even though a link calls an "asp" script it's output can be xml?Notice that when you call this link:guestbook.aspIt's output is xml, this is controlled by the "mime" type returned by the server.

response.ContentType = "text/xml"

In case you still need to write the xml file here's a referecne to the OpenTextFile method:OpenTextFileLet us know if you need more.. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...