[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: DOM DocumentType

  • From: Mike Sharp <msharp@l...>
  • To: "Hanson, Jon" <jhanson@l...>
  • Date: Fri, 29 Sep 2000 10:40:15 -0700

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.