tcrosswell
IS-IT--Management
Is anyone able to help me?
Here is my XML file:
<product>
<notes>FREE £2 of digital printing FREE minitripod worth £8 FREE Qbeo PhotoGenetics 2.0 worth £24.99 Supplied accessories 2MB SmartMedia™ card Case and strap USB cable & video cable Two AA alkaline batteries...</notes>
</product>
With a DTD I would have expressed that this element contained PCDATA so that it is not interpreted as markup. Then this file would be Well-formed. I am trying to learn how to use Schema's and at present I have:
<xs:complexType name="camera">
<xs:sequence>
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
but when I check to see if the XML file is Well-formed I get an error and says that the "&" in the <notes/> element is the problem.
How do I get round this? I am using type="xs:string" do I need to use anything else?
Thanks very much and I hope this makes sense I am new to XML and Schema's
Tom
Here is my XML file:
<product>
<notes>FREE £2 of digital printing FREE minitripod worth £8 FREE Qbeo PhotoGenetics 2.0 worth £24.99 Supplied accessories 2MB SmartMedia™ card Case and strap USB cable & video cable Two AA alkaline batteries...</notes>
</product>
With a DTD I would have expressed that this element contained PCDATA so that it is not interpreted as markup. Then this file would be Well-formed. I am trying to learn how to use Schema's and at present I have:
<xs:complexType name="camera">
<xs:sequence>
<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
but when I check to see if the XML file is Well-formed I get an error and says that the "&" in the <notes/> element is the problem.
How do I get round this? I am using type="xs:string" do I need to use anything else?
Thanks very much and I hope this makes sense I am new to XML and Schema's
Tom