The SIF® Zone
creating, assimilating, and promoting excellence in SIF® agent development

UK ADK xPath setElementOrAttribute

rated by 0 users
Not Answered This post has 0 verified answers | 0 Replies | 1 Follower

Top 75 Contributor
2 Posts
Points 50
Steven Kearney posted on 11-27-2009 9:20

Hi

I'm using xPath to do all my mapping from internal DTO's to the ADK objects, this is working pretty well with one exception, time fields.

So for example if I am setting the elements of a SIFDataObject for LearnerAttendance, I can do the following:

sdo.setElementOrAttribute("AttendanceDomain", "Lesson"); where sdo is the SIFDataObject in question.

I can also do this on Date by using SIFDate object, however this does not work for time:

Calendar c = GregorianCalendar.getInstance();

c.set(0, 0, 0, 10, 0,0);

sdo.setElementOrAttribute("FinishTime", new SIFTime(c).toString());

 

This fails and I get the following error: Unable to convert 10:00:00 to Integer

 

Am I doing something wrong? Can anyone provide me with an example for how to set a time field using setElementOrAttribute

 

Thanks

 

Steven

  • | Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright ©2006-2009 sifzone.com
Sponsored by Edustructures
We Connect the Systems that Power Education
 
SIF and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.