D
deepak
Hi All,
I have a big outgoing sucessfull XML message in a xmldocument and i wanted
to read those tags in this XML and their inertext(innerxml) which have dates.
i want to convert these dates(all dates are in local time zone means local
machine's time zone) from local time zone to UTC Format.
Note:While sending this message outside,always UTC date pattern will remain
same i.e.
UTC Format : 2008-02-14T12:44:39Z
Note: Z is the last word ,which is not there in below xml and this needs to
be attached once a particular date has been converted to UTC format.
<SXPTaskUpdateOrAddResult>
<ReturnCode>Success</ReturnCode>
<Task>
<Key>37820794</Key>
<Revision>10</Revision>
<Stamp>
<CreatedBy>India_Bharti</CreatedBy>
<TimeCreated>2008-02-14T12:44:39</TimeCreated>
<CreatingProcess>0</CreatingProcess>
<ModifiedBy>NT AUTHORITY\NETWORK SERVICE</ModifiedBy>
<TimeModified>2008-02-14T16:39:19</TimeModified>
<ModifyingProcess>0</ModifyingProcess>
</Stamp>
<CallID>KPN-NL_Deepak_0214_5</CallID>
<Number>0</Number>
<EarlyStart>2008-02-14T14:30:00</EarlyStart>
<DueDate>2008-02-14T15:44:00</DueDate>
<LateStart>1899-12-30T00:00:00</LateStart>
<Priority>1</Priority>
<Status Key="124127236">Unassigned</Status>
<Customer>KPN-NL</Customer>
<Calendar Key="50432000">NL Service Calendar (24x7)</Calendar>
<Region Key="124020736">NL</Region>
<District Key="258627584">NL KPN</District>
<Postcode>
</Postcode>
<PreferredEngineers>
</PreferredEngineers>
<ContractType Key="-1">
</ContractType>
<OpenDate>1899-12-30T00:00:00</OpenDate>
<ContactDate>1899-12-30T00:00:00</ContactDate>
<ConfirmationDate>1899-12-30T00:00:00</ConfirmationDate>
<TaskType Key="124786688">Corrective</TaskType>
<Duration>5400</Duration>
<RequiredEngineers>
</RequiredEngineers>
<NumberOfRequiredEngineers>1</NumberOfRequiredEngineers>
<RequiredSkills1>
<TaskRequiredSkill1>
<Key Key="125063170">Wireless Access _ 2G _ Nokia</Key>
<SkillLevel>3</SkillLevel>
</TaskRequiredSkill1>
<TaskRequiredSkill1>
<Key Key="125063168">Wireless Access _2G</Key>
<SkillLevel>3</SkillLevel>
</TaskRequiredSkill1>
</RequiredSkills1>
<RequiredSkills2>
</RequiredSkills2>
<EngineerType Key="-1">
</EngineerType>
<RequiredEngineerTools>
</RequiredEngineerTools>
<Critical>0</Critical>
<TimeDependencies>
</TimeDependencies>
<EngineerDependencies>
</EngineerDependencies>
<AppointmentStart>1899-12-30T00:00:00</AppointmentStart>
<AppointmentFinish>1899-12-30T00:00:00</AppointmentFinish>
<ContactName>Fredrik Viberg</ContactName>
<ContactPhoneNumber>+46 730 51 38 96</ContactPhoneNumber>
<BinaryData>LAAAAAAAPPPPPPPPPPPPPPPPOGAAAAAACAAAAAAACAAAAAAAFGAAAAAAAAAACAAFEHHAFGAAAAAAAAAADAAAAAAACAAAAAAAFGAAAAAAAAAAAAAFEHHAFGAAAAAAAAAADAAAAAAAPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP</BinaryData>
<Latitude>48019769</Latitude>
<Longitude>3338705</Longitude>
<GISDataSource>0</GISDataSource>
<Street>
</Street>
<City>
</City>
<State>
</State>
<TaskStatusContext>0</TaskStatusContext>
<IsCrewTask>0</IsCrewTask>
<CountryID Key="126105600">Netherlands</CountryID>
<EngineerRequirements>
</EngineerRequirements>
<IsScheduled>0</IsScheduled>
<CustomerEmail>
</CustomerEmail>
<ExcludedEngineers>
</ExcludedEngineers>
<NOCRefID>Deepak_0214_5</NOCRefID>
<Title>The work order title</Title>
<ServiceArea2 Key="126629888">NL Region 1</ServiceArea2>
<ServiceArea1 Key="126756864">NL Field Operations</ServiceArea1>
<SRO Key="126885888">ENN</SRO>
<MarketUnit Key="127016960">NE</MarketUnit>
<DescriptionLog>The description of the problem
India_Bharti / 2/14/2008 12:44:00 PM
The description of the problem
India_Bharti / 2/14/2008 12:53:59 PM
The description of the problem
India_Bharti / 2/14/2008 1:09:00 PM
The description of the problem
India_Bharti / 2/14/2008 1:12:59 PM
The description of the problem
India_Bharti / 2/14/2008 1:35:59 PM
The description of the problem
India_Bharti / 2/14/2008 1:36:00 PM
last comment only
ER_Kista / 2/14/2008 1:44:00 PM
last comment only
ER_Kista / 2/14/2008 4:34:00 PM
last comment only
ER_Kista / 2/14/2008 4:38:00 PM
last comment only
ER_Kista / 2/14/2008 4:38:59 PM
last comment only
ER_Kista / 2/14/2008 5:38:59 PM
</DescriptionLog>
<DesiredDueDate>2008-02-14T14:30:00</DesiredDueDate>
<Site>0637</Site>
<CustomerAddress>Mauritsweg 134</CustomerAddress>
<SolutionReport>
</SolutionReport>
<Attachments>
</Attachments>
<LatestAttachments>
</LatestAttachments>
<WOTimeCreated>2008-02-14T12:44:40</WOTimeCreated>
<NewComment>
</NewComment>
<SiteAddress>BENTINCKSKAMP 14 8191HB WAPENVELD</SiteAddress>
<AutoCreate>1</AutoCreate>
<EstimatedDuration>36000</EstimatedDuration>
<TimeToClose>1899-12-30T00:00:00</TimeToClose>
<CombinedDueDate>2008-02-14T14:30:00</CombinedDueDate>
<Warranty>172800</Warranty>
<DispatchedDate>1899-12-30T00:00:00</DispatchedDate>
<SendSMS>0</SendSMS>
<StatusTimes>
</StatusTimes>
<LastStatusUpdate>2008-02-14T12:44:40</LastStatusUpdate>
<ChangedOn>ER_Kista , 2/14/2008 5:39:33 PM</ChangedOn>
<StatusBeforeClosed Key="-1">
</StatusBeforeClosed>
<SLADuration>10800</SLADuration>
<ClosedNumber>0</ClosedNumber>
<CustomerRefKey Key="125329408">KPN-NL</CustomerRefKey>
<EquipmentType Key="127207424">
<Name>A10</Name>
<Customer Key="125329408">KPN-NL</Customer>
</EquipmentType>
<OptionalDate>1899-12-30T00:00:00</OptionalDate>
<HasPreviousWO>0</HasPreviousWO>
<HasPriorityChanged>0</HasPriorityChanged>
<PriorityTimes>
</PriorityTimes>
<MetricDate>2008-02-14T14:30:00</MetricDate>
<LastPriorityUpdate>2008-02-14T11:44:40</LastPriorityUpdate>
<StatusBeforeChange Key="-1">
</StatusBeforeChange>
<WasBackDated>0</WasBackDated>
<EngineerComment>
</EngineerComment>
<SubType>Not Available</SubType>
</Task>
</SXPTaskUpdateOrAddResult>System.Xml.XmlDocument
May we have this Algorithm:
1. Find all those tags which have the innertext or you can say innerxml as
in the format of say YYYY-MM-DDTtt:tt (i.e. 2008-02-14T12:44:39)
2. store them in array and pass this array to a function which will convert
them into UTC,Take back array.
3. fit these dates into xml and send the reponse object finally.
Kindly Help me as i m stuck and its affecting my project.
- Deepak
I have a big outgoing sucessfull XML message in a xmldocument and i wanted
to read those tags in this XML and their inertext(innerxml) which have dates.
i want to convert these dates(all dates are in local time zone means local
machine's time zone) from local time zone to UTC Format.
Note:While sending this message outside,always UTC date pattern will remain
same i.e.
UTC Format : 2008-02-14T12:44:39Z
Note: Z is the last word ,which is not there in below xml and this needs to
be attached once a particular date has been converted to UTC format.
<SXPTaskUpdateOrAddResult>
<ReturnCode>Success</ReturnCode>
<Task>
<Key>37820794</Key>
<Revision>10</Revision>
<Stamp>
<CreatedBy>India_Bharti</CreatedBy>
<TimeCreated>2008-02-14T12:44:39</TimeCreated>
<CreatingProcess>0</CreatingProcess>
<ModifiedBy>NT AUTHORITY\NETWORK SERVICE</ModifiedBy>
<TimeModified>2008-02-14T16:39:19</TimeModified>
<ModifyingProcess>0</ModifyingProcess>
</Stamp>
<CallID>KPN-NL_Deepak_0214_5</CallID>
<Number>0</Number>
<EarlyStart>2008-02-14T14:30:00</EarlyStart>
<DueDate>2008-02-14T15:44:00</DueDate>
<LateStart>1899-12-30T00:00:00</LateStart>
<Priority>1</Priority>
<Status Key="124127236">Unassigned</Status>
<Customer>KPN-NL</Customer>
<Calendar Key="50432000">NL Service Calendar (24x7)</Calendar>
<Region Key="124020736">NL</Region>
<District Key="258627584">NL KPN</District>
<Postcode>
</Postcode>
<PreferredEngineers>
</PreferredEngineers>
<ContractType Key="-1">
</ContractType>
<OpenDate>1899-12-30T00:00:00</OpenDate>
<ContactDate>1899-12-30T00:00:00</ContactDate>
<ConfirmationDate>1899-12-30T00:00:00</ConfirmationDate>
<TaskType Key="124786688">Corrective</TaskType>
<Duration>5400</Duration>
<RequiredEngineers>
</RequiredEngineers>
<NumberOfRequiredEngineers>1</NumberOfRequiredEngineers>
<RequiredSkills1>
<TaskRequiredSkill1>
<Key Key="125063170">Wireless Access _ 2G _ Nokia</Key>
<SkillLevel>3</SkillLevel>
</TaskRequiredSkill1>
<TaskRequiredSkill1>
<Key Key="125063168">Wireless Access _2G</Key>
<SkillLevel>3</SkillLevel>
</TaskRequiredSkill1>
</RequiredSkills1>
<RequiredSkills2>
</RequiredSkills2>
<EngineerType Key="-1">
</EngineerType>
<RequiredEngineerTools>
</RequiredEngineerTools>
<Critical>0</Critical>
<TimeDependencies>
</TimeDependencies>
<EngineerDependencies>
</EngineerDependencies>
<AppointmentStart>1899-12-30T00:00:00</AppointmentStart>
<AppointmentFinish>1899-12-30T00:00:00</AppointmentFinish>
<ContactName>Fredrik Viberg</ContactName>
<ContactPhoneNumber>+46 730 51 38 96</ContactPhoneNumber>
<BinaryData>LAAAAAAAPPPPPPPPPPPPPPPPOGAAAAAACAAAAAAACAAAAAAAFGAAAAAAAAAACAAFEHHAFGAAAAAAAAAADAAAAAAACAAAAAAAFGAAAAAAAAAAAAAFEHHAFGAAAAAAAAAADAAAAAAAPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP</BinaryData>
<Latitude>48019769</Latitude>
<Longitude>3338705</Longitude>
<GISDataSource>0</GISDataSource>
<Street>
</Street>
<City>
</City>
<State>
</State>
<TaskStatusContext>0</TaskStatusContext>
<IsCrewTask>0</IsCrewTask>
<CountryID Key="126105600">Netherlands</CountryID>
<EngineerRequirements>
</EngineerRequirements>
<IsScheduled>0</IsScheduled>
<CustomerEmail>
</CustomerEmail>
<ExcludedEngineers>
</ExcludedEngineers>
<NOCRefID>Deepak_0214_5</NOCRefID>
<Title>The work order title</Title>
<ServiceArea2 Key="126629888">NL Region 1</ServiceArea2>
<ServiceArea1 Key="126756864">NL Field Operations</ServiceArea1>
<SRO Key="126885888">ENN</SRO>
<MarketUnit Key="127016960">NE</MarketUnit>
<DescriptionLog>The description of the problem
India_Bharti / 2/14/2008 12:44:00 PM
The description of the problem
India_Bharti / 2/14/2008 12:53:59 PM
The description of the problem
India_Bharti / 2/14/2008 1:09:00 PM
The description of the problem
India_Bharti / 2/14/2008 1:12:59 PM
The description of the problem
India_Bharti / 2/14/2008 1:35:59 PM
The description of the problem
India_Bharti / 2/14/2008 1:36:00 PM
last comment only
ER_Kista / 2/14/2008 1:44:00 PM
last comment only
ER_Kista / 2/14/2008 4:34:00 PM
last comment only
ER_Kista / 2/14/2008 4:38:00 PM
last comment only
ER_Kista / 2/14/2008 4:38:59 PM
last comment only
ER_Kista / 2/14/2008 5:38:59 PM
</DescriptionLog>
<DesiredDueDate>2008-02-14T14:30:00</DesiredDueDate>
<Site>0637</Site>
<CustomerAddress>Mauritsweg 134</CustomerAddress>
<SolutionReport>
</SolutionReport>
<Attachments>
</Attachments>
<LatestAttachments>
</LatestAttachments>
<WOTimeCreated>2008-02-14T12:44:40</WOTimeCreated>
<NewComment>
</NewComment>
<SiteAddress>BENTINCKSKAMP 14 8191HB WAPENVELD</SiteAddress>
<AutoCreate>1</AutoCreate>
<EstimatedDuration>36000</EstimatedDuration>
<TimeToClose>1899-12-30T00:00:00</TimeToClose>
<CombinedDueDate>2008-02-14T14:30:00</CombinedDueDate>
<Warranty>172800</Warranty>
<DispatchedDate>1899-12-30T00:00:00</DispatchedDate>
<SendSMS>0</SendSMS>
<StatusTimes>
</StatusTimes>
<LastStatusUpdate>2008-02-14T12:44:40</LastStatusUpdate>
<ChangedOn>ER_Kista , 2/14/2008 5:39:33 PM</ChangedOn>
<StatusBeforeClosed Key="-1">
</StatusBeforeClosed>
<SLADuration>10800</SLADuration>
<ClosedNumber>0</ClosedNumber>
<CustomerRefKey Key="125329408">KPN-NL</CustomerRefKey>
<EquipmentType Key="127207424">
<Name>A10</Name>
<Customer Key="125329408">KPN-NL</Customer>
</EquipmentType>
<OptionalDate>1899-12-30T00:00:00</OptionalDate>
<HasPreviousWO>0</HasPreviousWO>
<HasPriorityChanged>0</HasPriorityChanged>
<PriorityTimes>
</PriorityTimes>
<MetricDate>2008-02-14T14:30:00</MetricDate>
<LastPriorityUpdate>2008-02-14T11:44:40</LastPriorityUpdate>
<StatusBeforeChange Key="-1">
</StatusBeforeChange>
<WasBackDated>0</WasBackDated>
<EngineerComment>
</EngineerComment>
<SubType>Not Available</SubType>
</Task>
</SXPTaskUpdateOrAddResult>System.Xml.XmlDocument
May we have this Algorithm:
1. Find all those tags which have the innertext or you can say innerxml as
in the format of say YYYY-MM-DDTtt:tt (i.e. 2008-02-14T12:44:39)
2. store them in array and pass this array to a function which will convert
them into UTC,Take back array.
3. fit these dates into xml and send the reponse object finally.
Kindly Help me as i m stuck and its affecting my project.
- Deepak