-
XML Error { RESOLVED }
Hi I am trying to validate the following XML file against the scheme provided here.
valEndDate is an element in "complexType OptTmsTimesheetEntry"
audDateChanged is an element in "complexType OptTmsTimesheetEntry"
audDateChanged [one at the bottom of xml file] is an element in "complexType OptTmsTimesheetLineEntry"
Thought it would be easier for you to see where to look in schema.
Code:
<OptTms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="G:\XML Schema Development\OptTms.xsd" xsi:type="TimesheetAction" Count="1" Action="Update">
<Timesheet Count="4">
<keyTimesheetStatus>2</keyTimesheetStatus>
<!-- <valEndDate>12/11/2004</valEndDate> -->
<audUserChanged>David</audUserChanged>
<!-- <audDateChanged>12/11/2003</audDateChanged> -->
<TimesheetLines Count="1">
<TimesheetLine Count="11">
<ridTimesheetLine>1</ridTimesheetLine>
<keySubProject>1</keySubProject>
<valMon>2</valMon>
<valTue>4</valTue>
<valWed>32</valWed>
<valThu>1</valThu>
<valFri>5</valFri>
<valSat>5</valSat>
<valSun>1</valSun>
<audUserChanged>David</audUserChanged>
<!-- <audDateChanged>28/10/2003</audDateChanged> -->
</TimesheetLine>
</TimesheetLines>
</Timesheet>
</OptTms>
I have commented out the fields I am getting an error in. If I uncomment them then I am getting the following error.
Invalid value for datatype dateTime in element [whereever there is a dataTime].
Any idea.
-
Are they the right format for dates? This seems to be saying that it should be yyyy-mm-dd.
-
Excellent. Can't believe I missed that part. DOH
You are the champ.:D