R
Roland Hall
I'm having a really tough time finding references for XML with ASP.
Everything I find assumes I already have an XML file and want to display it
with ASP. I'm looking for reference material where I can CREATE XML files
using ASP.
Currently I am looking for a way to put in the following line in an XML file
using ASP.
<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>
I can add
<?xml version="1.0" encoding="ISO-8859-1"?>
using...
set pi = objXML.createProcessingInstruction("xml", "version='1.0'
encoding='ISO-8859-1'")
objXML.insertBefore pi, objXML.firstChild
and...
<?xml-stylesheet type='text/xsl' href='freight.xsl'?>
using...
set pi2 = objXML.createProcessingInstruction("xml-stylesheet",
"type='text/xsl' href='freight.xsl'")
objXML.insertBefore pi2, objXML.firstChild
but I cannot find a way to include:
<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>
I tried using:
dim node
set node = objXML.createTextNode("<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>")
objXML.insertBefore node, objXML.firstChild
but I get an error:
msxml4.dll error '80004005'
This operation can not be performed with a Node of type PCDATA.
/dev/freight2.asp, line 55
Apparently MSFT seems to think nobody uses VBScript in ASP to work with XML.
All examples are in JScript and they give you a guideline of how to convert
examples/syntax but still nothing re: doctype. The info only tells you how
to use it to OBTAIN doctype info from an existing XML file.
Since I have no references, I thought I'd try something else:
objXML.doctype = "<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>"
but I get an errror:
Wrong number of arguments or invalid property assignment: 'objXML.doctype'
I'm betting the latter since I believe using it this way is read-only.
If someone could just point me to a reference with all commands with
vbscript syntax, I'd forever be appreciative.
TIA...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Everything I find assumes I already have an XML file and want to display it
with ASP. I'm looking for reference material where I can CREATE XML files
using ASP.
Currently I am looking for a way to put in the following line in an XML file
using ASP.
<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>
I can add
<?xml version="1.0" encoding="ISO-8859-1"?>
using...
set pi = objXML.createProcessingInstruction("xml", "version='1.0'
encoding='ISO-8859-1'")
objXML.insertBefore pi, objXML.firstChild
and...
<?xml-stylesheet type='text/xsl' href='freight.xsl'?>
using...
set pi2 = objXML.createProcessingInstruction("xml-stylesheet",
"type='text/xsl' href='freight.xsl'")
objXML.insertBefore pi2, objXML.firstChild
but I cannot find a way to include:
<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>
I tried using:
dim node
set node = objXML.createTextNode("<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>")
objXML.insertBefore node, objXML.firstChild
but I get an error:
msxml4.dll error '80004005'
This operation can not be performed with a Node of type PCDATA.
/dev/freight2.asp, line 55
Apparently MSFT seems to think nobody uses VBScript in ASP to work with XML.
All examples are in JScript and they give you a guideline of how to convert
examples/syntax but still nothing re: doctype. The info only tells you how
to use it to OBTAIN doctype info from an existing XML file.
Since I have no references, I thought I'd try something else:
objXML.doctype = "<!DOCTYPE FREIGHT SYSTEM 'freight.dtd'>"
but I get an errror:
Wrong number of arguments or invalid property assignment: 'objXML.doctype'
I'm betting the latter since I believe using it this way is read-only.
If someone could just point me to a reference with all commands with
vbscript syntax, I'd forever be appreciative.
TIA...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp