Archive for category XML
The type ‘System.IO.Packaging.Package’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsBase’
Posted by Imran Akram in C#, VB .NET, XML on June 1, 2011
While I was working with the Open Office XML SDK 2.0, after I added the reference to the DocumentFormat.OpenXml assembly and tried to build the application I ran into this error message.
The type ‘System.IO.Packaging.Package’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35′
Turns out, all you need to do to fix it is to just add another reference to WindowsBase assembly that is found in the .NET Tab.
Generating an XML Schema of SQL Server 2005 Database
Posted by Imran Akram in SQL Server 2005, XML on June 20, 2008
I was told to generate an XML Schema of an SQL Server 2005 Database. And naturally I started googling it out so I found this at a blog given by the URL at the bottom.
Thumbs up to ya my friend!
create table Person
(
Age int not NULL check( Age > 0) ,
Height numeric(10,2) not NULL check( Height > 5),
Gender varchar(5) not null check( Gender in (‘M’, ‘F’, ‘O’)),
BirthDate datetime null,
)
DECLARE @schema xml
SET @schema = (SELECT * FROM Person FOR XML AUTO, ELEMENTS, XMLSCHEMA(‘PersonSchema’))
select @schema
OUTPUT:
http://dwightrau.blogspot.com/2008/02/generate-or-create-xsd-schema-from.html
