You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I got something put together that I think should work, but its not. It runs with no errors, but I dont get a file created. Here is my code:
<html>
<body>
<script languate="vbscript">
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.createTextfile("C:\temp\NewXmlFile.xml", True)
With f
.Writeline "<root>"
.Writeline "<element>test</element>"
.Writeline "</root>"
.Close
End With
Set xmlDom = CreateObject("Microsoft.XMLDOM")
XmlDom.async = False
XmlDom.Load("C:\temp\NewXmlFile.xml")
You're asking questions about browser security settings, Javascript etc, which have nothing to do with XML and are off-topic for this forum. You might hit lucky and get an answer from someone, but not from me.
Michael Kay http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Hoes does creating an xml file with VBSCRIPT have ANYTHING to do with browser security settings, or javascript? Sorry that I'm such a newb, but it seems that it fits to me. I want to create an xml file, so Im in the xml forum...
Your problem is creating a file from within the browser. The fact that it's an XML file is irrelevant. Normal browser security settings prevent you from modifying the filestore on the client machine.
Michael Kay http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference