XML Code (1 Viewer)

VegaLA

Registered User.
Local time
Today, 01:21
Joined
Jul 12, 2006
Messages
101
Hi all,
I am reading through a SQL Server 2005 book and
has this code exercise which create a XSD file, but when I try to run it I am getting an error message re line 3.

Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '‘'.

This line :-
‘<?xml version=”1.0” encoding=”utf-8”?>

The full code is as follows...

CREATE XML SCHEMA COLLECTION PurchaseOrderCollection
AS
‘<?xml version=”1.0” encoding=”utf-8”?>
<xs:schema attributeFormDefault=”unqualified”
elementFormDefault=”qualified”
xmlns:xs=”http://www.w3.org/2001/XMLSchema”>
<xs:element name=”PurchaseOrder”>
<xs:complexType>
<xs:sequence>
<xs:element name=”Date” type=”xs:string” />
<xs:element name=”From” type=”xs:string” />
<xs:element name=”Contact” type=”xs:string” />
<xs:element name=”ContactPhone” type=”xs:string”/>
<xs:element name=”LineItems”>
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs=”unbounded”
name=”LineItem”>
<xs:complexType>
<xs:simpleContent>
<xs:extension base=”xs:string”>
<xs:attribute name=”Quantity”
type=”xs:unsignedShort” use=”required” />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>’

I typed it at first and when I started getting the error message I decided to copy the text and place it sirectly into SQL Server 2005 but I am still getting the error, looks like there may be a mistake in the book but can anyone correct it ?

Thanks in advance,
Mitch........
 

Bogzla

Registered User.
Local time
Today, 09:21
Joined
May 30, 2006
Messages
55
Have you tried capitalising 'UTF-8' ?

I know xml is strict when it comes to case. Other than that, no idea...
 

Users who are viewing this thread

Top Bottom