How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience:  M.S. in Internet Information Systems
59032869
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

Help with xml

This answer was rated:

Hello, i'm learning xml and trying to validate my xml against my schema and I get te following error.


 


cvc-complex-type.2.3: Element 'movieCatalog' cannot have character [children], because the type's content type is element-only. [27]


 


 


> Please see my schema:


 


<!-- please note comment was addes so xml can show up in this box. 


 


 


 


<?xml version="1.0"?> <xs:schema          xmlns:xs="http://www.w3.org/2001/XMLSchema">        <xs:element name="movieCatalog">       <xs:complexType>          <xs:sequence>             <xs:element maxOccurs="unbounded" ref="movie"/>          </xs:sequence>       </xs:complexType>    </xs:element>   <xs:element name="movie">       <xs:complexType>          <xs:sequence>             <xs:element name="title" type="xs:string"/>             <xs:element name="summary" type="xs:string"/>             <xs:element name="year" type="xs:integer"/>        <xs:element name="director">      <xs:complexType mixed="true">      <xs:sequence>      <xs:element name="dirFirstName" type="xs:string"/>      <xs:element name="dirLastName" type="xs:string"/>     </xs:sequence>                </xs:complexType>    </xs:element>            <xs:element name="runTime" type="xs:integer"/>    <xs:element name="studio" type="xs:string"/>


  <xs:element name="actor">     <xs:complexType>       <xs:sequence>         <xs:element name="actFirstName" type="xs:string"/>         <xs:element name="actLastName" type="xs:string"/>       </xs:sequence>     </xs:complexType>   </xs:element>     <xs:element name="actor">     <xs:complexType>       <xs:sequence>         <xs:element name="actFirstName" type="xs:string"/>         <xs:element name="actLastName" type="xs:string"/>       </xs:sequence>     </xs:complexType>   </xs:element>


  <xs:element name="actor">     <xs:complexType>       <xs:sequence>         <xs:element name="actFirstName" type="xs:string"/>         <xs:element name="actLastName" type="xs:string"/>       </xs:sequence>     </xs:complexType>   </xs:element>             </xs:sequence>   </xs:complexType>  </xs:element>   </xs:schema>


 


 


Here is my xml 


 


 


<?xml version="1.0"?> <movieCatalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="hw5schema.xsd">> <movie> <title>Ghostbusters</title> <summary>Three layed off scientists take up careers as ghostbusters as they save the city from a recent spike in paranormal activity</summary> <year>1984</year> <director> <dirFirstName>Ivan</dirFirstName> <dirLastName>Reitman</dirLastName> </director>


<runTime>107</runTime> <studio>Columbia Pictures</studio> <actor> <actFirstName>Bill</actFirstName> <actLastName>Murray</actLastName> </actor> <actor> <actFirstName>Dan</actFirstName> <actLastName>Aykroyd</actLastName> </actor> <actor> <actFirstName>Harold</actFirstName> <actLastName>Ramis</actLastName> </actor> </movie> </movieCatalog>


 

THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
TheDoctor and 4 other Homework Specialists are ready to help you

Related Homework Questions