Created
January 21, 2014 19:53
-
-
Save rodrigocnascimento/8547108 to your computer and use it in GitHub Desktop.
Gerando XML com ASP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'GERANDO XML ------------------------------------------------------------------------------------------------ | |
ArquivoXML = "lance_a_lance.xml" 'adicionando um nome no arquivo | |
timestamp = DateAdd("h", 3, Time) | |
Set FSO = CreateObject("Scripting.FileSystemObject") 'criando o objeto FSO | |
Set Linhas = FSO.CreateTextFile(Server.MapPath(ArquivoXML), True) 'salvando o arquivo no servidor através do método "CreateTextFile" | |
'gerando linas | |
Linhas.WriteLine("<?xml version=""1.0""?>") | |
Linhas.WriteLine("<LANCE_A_LANCE>") | |
Linhas.WriteLine("<TEMPO_JOGO>"&titulo&"</TEMPO_JOGO>" ) | |
Linhas.WriteLine("<MINUTO_JOGO>"&MINUTO&"</MINUTO_JOGO>" ) | |
Linhas.WriteLine("<COMENTARIO>"&comentario&"</COMENTARIO>" ) | |
Linhas.WriteLine("<TIMESTAMP>"×tamp&"</TIMESTAMP>" ) | |
Linhas.WriteLine("</LANCE_A_LANCE>") | |
'destruíndo os objetos | |
Linhas.Close | |
Set Linhas = Nothing | |
'------------------------------------------------------------------------------------------------ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment