これが私の最初の XML です。
<leaveBalanceTotal>
<employeeId>0001234</employeeId>
<uscId>1234567894654</uscId>
<leaveDescription>Sick</leaveDescription>
<leaveCodeStr>SS</leaveCodeStr>
<balanceAmount>90.22</balanceAmount>
<leaveDescription>Vacation</leaveDescription>
<leaveCodeStr>VA</leaveCodeStr>
<balanceAmount>187.11</balanceAmount>
<leaveDescription>Winter Recess</leaveDescription>
<leaveCodeStr>WR</leaveCodeStr>
<balanceAmount>30</balanceAmount>
<effectiveDate>03/11/2013 23:59:59</effectiveDate>
<totalDaysService>6062</totalDaysService>
<lastPayEndDate>03/11/2013 23:59:59</lastPayEndDate>
</leaveBalanceTotal>
この XSLT を使用して、必要な形式に変換しています。
<xsl:stylesheet
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xtt="urn:com.workday/xtt"
xmlns:etv="urn:com.workday/etv"
xmlns:wd="urn:com.workday.report/CR-INT486-Kuali_Trojan_Time-Absence_Balances-Outbound"
exclude-result-prefixes="wd xsl"
>
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<document>
<xsl:for-each select="wd:Report_Data/wd:Report_Entry/wd:All_Eligible_Time_Off_Plans_for_Worker">
<leaveBalanceTotal>
<employeeId><xsl:value-of select="parent::node()/wd:employeeId"/></employeeId>
<uscId><xsl:value-of select="parent::node()/wd:uscId"/></uscId>
<leaveCodeId><xsl:value-of select="wd:leaveCodeStr"/></leaveCodeId>
<balanceAmount><xsl:value-of select="wd:balanceAmount"/></balanceAmount>
<effectiveDate><xsl:value-of select="parent::node()/wd:effectiveDate"/></effectiveDate>
<totalDaysService><xsl:value-of select="parent::node()/wd:totalDaysService"/></totalDaysService>
<lastPayEndDate><xsl:value-of select="parent::node()/wd:lastPayEndDate"/></lastPayEndDate>
</leaveBalanceTotal>
</xsl:for-each>
</document>
</xsl:template>
</xsl:stylesheet>
これは私が得る出力です:
<leaveBalanceTotal>
<employeeId>0001234</employeeId>
<uscId>1234567894654</uscId>
<leaveDescription>Sick</leaveDescription>
<leaveCodeStr>SS</leaveCodeStr>
<balanceAmount>90.22</balanceAmount>
<effectiveDate>03/11/2013 23:59:59</effectiveDate>
<totalDaysService>6062</totalDaysService>
<lastPayEndDate>03/11/2013 23:59:59</lastPayEndDate>
</leaveBalanceTotal>
<leaveBalanceTotal>
<employeeId>0001234</employeeId>
<uscId>1234567894654</uscId>
<leaveDescription>Vacation</leaveDescription>
<leaveCodeStr>VA</leaveCodeStr>
<balanceAmount>187.11</balanceAmount>
<effectiveDate>03/11/2013 23:59:59</effectiveDate>
<totalDaysService>6062</totalDaysService>
<lastPayEndDate>03/11/2013 23:59:59</lastPayEndDate>
</leaveBalanceTotal>
<leaveBalanceTotal>
<employeeId>0001234</employeeId>
<uscId>1234567894654</uscId>
<leaveDescription>Winter Recess</leaveDescription>
<leaveCodeStr>WR</leaveCodeStr>
<balanceAmount>30</balanceAmount>
<effectiveDate>03/11/2013 23:59:59</effectiveDate>
<totalDaysService>6062</totalDaysService>
<lastPayEndDate>03/11/2013 23:59:59</lastPayEndDate>
</leaveBalanceTotal>
ただし、次のように 2 つの日付フィールドを UNIX ミリ秒に変換し、日付を UNIX ミリ秒に変換する必要があります。
<leaveBalanceTotal>
<employeeId>0001234</employeeId>
<uscId>1234567894654</uscId>
<leaveDescription>Sick</leaveDescription>
<leaveCodeStr>SS</leaveCodeStr>
<balanceAmount>90.22</balanceAmount>
<effectiveDate>1363060799000</effectiveDate>
<totalDaysService>6062</totalDaysService>
<lastPayEndDate>1363060799000</lastPayEndDate>
</leaveBalanceTotal>
<leaveBalanceTotal>
<employeeId>0001234</employeeId>
<uscId>1234567894654</uscId>
<leaveDescription>Vacation</leaveDescription>
<leaveCodeStr>VA</leaveCodeStr>
<balanceAmount>187.11</balanceAmount>
<effectiveDate>1363060799000</effectiveDate>
<totalDaysService>6062</totalDaysService>
<lastPayEndDate>1363060799000</lastPayEndDate>
</leaveBalanceTotal>
<leaveBalanceTotal>
<employeeId>0001234</employeeId>
<uscId>1234567894654</uscId>
<leaveDescription>Winter Recess</leaveDescription>
<leaveCodeStr>WR</leaveCodeStr>
<balanceAmount>30</balanceAmount>
<effectiveDate>1363060799000</effectiveDate>
<totalDaysService>6062</totalDaysService>
<lastPayEndDate>1363060799000</lastPayEndDate>
</leaveBalanceTotal>
基本的に、誰かがこれらの日付を変換する方法を教えてくれることを願っています。どんな助けでも大歓迎です。