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

RE: save XML into database

  • To: "Ken North" <kennorth@s...>,<xml-dev@l...>
  • Subject: RE: save XML into database
  • From: "Michael Rys" <mrys@m...>
  • Date: Fri, 28 Oct 2005 20:22:32 -0700
  • Thread-index: AcXcARdBIjgVlICsSmyYtybiinZ2cQANl2mQ
  • Thread-topic: save XML into database

save xml data to 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!

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.