|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: save XML into database
Well, the problem is that often if the XML data comes from another provider, you do not know what code page you need to use without looking at the data (which you want to avoid). And storing different documents of different encodings is problematic at best if you are using the notion of a code page and a string type. If you however use a binary type then the encoding of the XML is preserved and you do not get into a code-page issue and an XML parser will be happy. Obviously similar things can be said about using an XML datatype (which most likely will use either UTF-8 or UTF-16 as internal encoding). Using different XML Schemas is less of a problem with concepts such as the XML Schema collections that are currently supported in SQL Server 2005 and are also part of the upcoming SQL standard... Best regards Michael > -----Original Message----- > From: Ken North [mailto:kennorth@s...] > Sent: Friday, October 28, 2005 1:44 PM > To: xml-dev@l... > Subject: Re: save XML into database > > RE: save XML into databaseMichael Rys wrote: > >> Actually a BLOB/varbinary(max) type is better suited for XML than a > CLOB/varchar(max) type since the BLOB has no code page associated with it > and > therefore does not interfere with the XML document's encoding. > > Depending on your choice of data access API/driver/provider, you can > dynamically > set the encoding to use for characters on a per connection basis. By > changing a > connection property, you can override the database's default. > > A related issue is storing documents of different encodings in the same > column. > If the column is of type XML, we may want to use different XML schemas for > the > same document (column). > > ======== Ken North =========== > www.WebServicesSummit.com > www.SQLSummit.com > www.GridSummit.com > > > > ----------------------------------------------------------------- > 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 list use the subscription > manager: <http://www.oasis-open.org/mlmanage/index.php>
|
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
|
|||||||||

Cart








