[xsd-users] How can I parse time in milliseconds using xml_schema::time(hour, minute, second)

Harpinder Kaur mailme.harpinder at gmail.com
Mon Jun 26 14:00:23 EDT 2017


Hi, thanks for prompt reply.
I can't share code due to some restrictions. But to be specific, please
consider below:

I need to display time as "21:32:52.126" but I am unable to do so. I have
read the code synthesis documentation and related stuff, there I cam to
know that built-in time type has a constructor like time(int hour , int
minutes , *double seconds*). I tried passing fractional time(combined
seconds and milliseconds from an input boost::ptime object) to the
constructor to write finally as an XML tag's value. However, XML tag is
having only 21:32:52 as time value, milliseconds are getting truncated. Is
there something with serialization or something else?




Really appreciate your thoughtful attention to this.


Harpinder Kaur |  Organizer, GDG Jalandhar |  mailme.harpinder at gmail.com |  +91
99 88 124495

*LinkedIn
<http://t.signauxdeux.com/e1t/c/5/f18dQhb0SmZ58dDMPbW2n0x6l2B9nMJW7sM9dn7dK_MMdBzM2-04?t=http%3A%2F%2Fin.linkedin.com%2Fin%2Fharpinderkaur&si=6156599917281280&pi=7a871002-9e19-4476-9c27-276c54ee525e>
| Google+
<http://t.signauxdeux.com/e1t/c/5/f18dQhb0SmZ58dDMPbW2n0x6l2B9nMJW7sM9dn7dK_MMdBzM2-04?t=https%3A%2F%2Fplus.google.com%2Fu%2F0%2F%2BHarpinderKaur05&si=6156599917281280&pi=7a871002-9e19-4476-9c27-276c54ee525e>*
​

On Mon, Jun 26, 2017 at 9:57 PM, Boris Kolpackov <boris at codesynthesis.com>
wrote:

> Harpinder Kaur <mailme.harpinder at gmail.com> writes:
>
> > I am working with xsd but I am unable to figure out why I am unable to
> > write milliseconds in final XML being generated.
>
> Can you be more specific? What exactly are you doing and what doesn't
> work? Seeing some concrete code is always helpful.
>
> Boris
>


More information about the xsd-users mailing list