I am fairly new to XML and am having trouble with a new element requirement. We are using a fairly complex XSD (at least complex to me) and a recent update includes the attribute nillable = "true" for some numeric values.
I cannot get the feed to validate (using XML Notepad) when any of these numeric values are null and need help understanding why.
I'm not sure what needs to be posted here for help, so will just post a few bits here:
From the XSD file in the heading:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
From the XSD file for the elements in question:
<xs:element name="ProductPrice">
<xs:complexType>
<xs:sequence>
</xs:element>
<xs:element name="PriceA" type="xs:float" nillable="true">
</xs:element>
<xs:element name="PriceB" type="xs:float" nillable="false">
</xs:element>
<xs:element name="PriceC" type="xs:float" nillable="true">
</xs:element>
<xs:element name="PriceD" type="xs:float" nillable="true">
</xs:element>
<xs:element name="PriceE" type="xs:float" nillable="true">
</xs:element>
<xs:element name="PriceF" type="xs:float" nillable="true">
</xs:element>
<xs:element name="PriceG" type="xs:float" nillable="true">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
From the XML file:
<?xml version = "1.0" encoding="ISO-8859-1"?><ProductImport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
The error that I am getting is that the value of the elements PriceE, PriceF and PriceG is not valid because of the "float" definition. I cannot include a value for these prices - zero is not correct.
How do I format the XML for the "ProductPrice" so that it is valid.
Bookmarks