OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: DOM DocumentType

[ Lists Home | Date Index | Thread Index ]
  • From: Mike Sharp <msharp@lante.com>
  • To: "Hanson, Jon" <jhanson@lehman.com>
  • Date: Fri, 29 Sep 2000 10:40:15 -0700



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@lehman.com> on 09/27/2000 05:59:48 AM

To:   xml-dev@lists.xml.org
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












 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS