[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: DOM DocumentType
Jon, If you're doing this on a web page in order to send it to the client, you can cheat a little. For example, when creating a WML page to send to a WAP phone, I sometimes cheat by using: Response.ContentType = "text/vnd.wap.wml" Response.Write("<?xml version='1.0'?>") Response.Write("<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN' 'http://www.wapforum.org/DTD/wml_1.1.xml'>") Response.Write(xmlDoc.transformNode(xslDoc)) The only other way I can think of is to do something like: boolValue = oXMLDOMDocument.loadXML(xmlString) where xmlString is: xmlString = "<?xml version='1.0'?>" xmlString = xmlString & "<!DOCTYPE wml PUBLIC '-//WAPFORUM//DTD WML 1.1//EN' " xmlString = xmlString & "'http://www.wapforum.org/DTD/wml_1.1.xml'>" Then you create/append the rest of the tree. There's probably a more elegant way, but ... Regards, Mike Sharp Lante Corporation "Hanson, Jon" <jhanson@l...> on 09/27/2000 05:59:48 AM To: xml-dev@l... cc: (bcc: Mike Sharp/Lante) Subject: DOM DocumentType In the DOM the DocumentType is a read-only attribute of the Document interface. If I am creating a DOM structure in memory from some program data, how do I set the DocumentType? Thanks, Jon
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|