XML Schema doesn't work

MistyBlue

New Member
I want to link an XML Schema with an XML file. I followed this example: XSD How To.The \[code\]note.xml\[/code\] looks like:\[code\]<?xml version="1.0"?><notexmlns="http://www.w3schools.com"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.w3schools.com note.xsd"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body></note> \[/code\]And the \[code\]note.xsd\[/code\] looks like:\[code\]<?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"targetNamespace="http://www.w3schools.com"xmlns="http://www.w3schools.com"elementFormDefault="qualified"><xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType></xs:element></xs:schema> \[/code\]But when I open the \[code\]note.xml\[/code\], it just looks like a regular XML in my browser, with the description: \[code\]This XML file does not appear to have any style information associated with it. The document tree is shown below.\[/code\]
These files are both in the same directory.
 
Back
Top