Page last modified 15:53, 26 Mar 2014 by jukkam

cvc-elt-3-2-1

    Table of contents
    No headers

    Version as of 04:35, 14 Oct 2019

    to this version.

    Return to Version archive.

    View current version

    General description of the error:

    The format of the error message: cvc-elt.3.2.1: Element ''{0}'' cannot have character or element information [children], because ''{1}'' is specified.

    Error description in schema standard: http://www.w3.org/TR/2007/WD-xmlschema11-1-20070830/#cvc-elt

    Possible causes for this error:

    • Element in validated file has an attribute "nillable="true"" which means that the element can't contain any values or child elements.

    An example

    <order xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <product>XML Schema Tutorial Book</product>
      <price></price>
      <shipDate carrier="FedEx" xsi:nil="true">2099-12-31</shipDate>
    </order>

     

     

     

     

     

    Error message: Error cvc-elt.3.2.1: Element 'shipDate' cannot have character or element information [children], because 'http://www.w3.org/2001/XMLSchema-instance,nil' is specified.

    How to fix: The error can be corrected by removing either the content of the 'shipDate' element or the attribute "xsi:nil="true".

    <order xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <product>XML Schema Tutorial Book</product>
      <price></price>
      <shipDate carrier="FedEx" xsi:nil="true"></shipDate>
    </order>
     
    Menu