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

Re: How to specify a Processing Instruction? (better: how to controlenco

  • From: ComCity <mikeb@c...>
  • To: "Arnold, Curt" <Curt.Arnold@h...>, xml-dev@l...
  • Date: Wed, 29 Aug 2001 12:12:56 -0700

msxml encoding processinginstruction
----- Original Message -----
From: Arnold, Curt <Curt.Arnold@h...>
To: <xml-dev@l...>
Sent: Wednesday, August 29, 2001 11:06 AM
Subject: RE: How to specify a Processing Instruction? (better: how to cont
rolencoding on saving)



> The XML declaration is not a Processing Instruction, it only resembles a
Processing Instruction.
>
Microsoft calls it the PI and has a specific method with these words...so I
was just using what they seem to indicate in their documentation.

> It is not a XML document since an XML document requires one and only one
document element.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <foo/>
>
> Is an XML document

Well it still won't read it in.  It will only read it in if the encoding
string is not present.  I assume that means its not in ISO-8859-1.  I think
I might be starting to understand it.  If I do, then I think what everyone
is saying is that I cannot start with an XML template, rather, I have to
create the XML document completely over again, with the ISO-8859-1 encoding
standard from the start and then hopefully the UPS text encoding will stay
preserved when the node is added.

> Again encoding is a property of an XML document when written out as a
stream of bytes, it has no meaning while in a DOM tree.  MSXML's unusual use
of a ProcessingInstruction node to represent the XML
> declaration only describes the former state of the document, at one time
it was encoding using whatever.

So, I can't take an existing DOM in whatever originally encoding it was,
even UTF-8, modify it and save it in a differnet encoded byte stream?


> The XML recommendation addressed this by basing XML on Unicode and stating
the only required encodings are UTF-8 and UTF-16.  Use of any other
encodings is allowed but not required, so if you want
> your documents to universally readable, you will encode them in either
UTF-8 or UTF-16.

Unfortunely, UPS requires the XML document be in a specific format with a
certain text element being very specific.  I'm not in control of their
parser or their requirements.


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.