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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to specify a Processing Instruction? (better: howtocontrolencoding on saving)



Well this does not work for me.  I'm in VB, and not VB Script, but if I do
this and the PI is not changed and remains
<?xml version="1.0"?>

The
<?xml version="1.0" encoding="ISO-8859-1"?>
does not show up.

I'm using MSXML 3.0, sp1 I believe.

Am I going in sane, why does none of this stuff work for me.

Thank You very much.
Michael Barber
ComCity Corporation
6690 Amador Plaza Rd., Suite 115
Dublin CA
925-556-6940
Fax: 925-556-6945

DISCLAIMER:  This e-mail contains proprietary information some or all of
which may be legally privileged.  It is for the intended recipient(s) only.
If an addressing or transmission error has misdirected this e-mail, please
notify the author by replying to this e-mail.  If you are not the intended
recipient you must not use, disclose, distribute, copy, print, or reply on
this e-mail.

----- Original Message -----
From: <s.livingstone@btinternet.com>
To: <xml-dev@lists.xml.org>
Sent: Wednesday, August 29, 2001 3:34 PM
Subject: RE: How to specify a Processing Instruction? (better: how
tocontrolencoding on saving)


The following same changes the file test.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<steven>©</steven>

and changes the encoding as follows:

<?xml version="1.0" encoding="ISO-8859-1"?>
<steven>©</steven>

The script is..

set xmlDoc = server.createobject("Msxml2.DOMDocument.3.0")
xmlDoc.async = false
xmlDoc.validateOnParse = true
xmlDoc.load(server.MapPath("test.xml"))

set pi = xmlDoc.createProcessingInstruction("xml", "version='1.0'
encoding='ISO-8859-1'")
xmlDoc.replaceChild pi,xmlDoc.childNodes.item(0)

xmlDoc.save(server.MapPath("test.xml"))

Whether standard or not, it works.

Cheers,
Steven
Author, Pro XML2e

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.xml.org/ob/adm.pl>