I have a problem with either xml parsing or date formatting, I am not quite
sure which.

Consider the following code:-

<x:parse var="xml">
  <test>
    <unit date="20040602142014">
      </unit>
    <unit date="20040602143809">
      </unit>
    </test>
  </x:parse>
<table>
  <x:forEach select="$xml/test/unit">
    <fmt:parseDate var="updated" pattern="yyyyMMddHHmmss" type="both">
      <x:out select="@date" />
      </fmt:parseDate>
      <TR>
        <TD>
          <fmt:formatDate value="${updated}" pattern="yyyy-MM-dd HH:mm:ss" />
          </TD>
        </TR>
    </x:forEach>
  </TABLE>

One would expect this to produce:-

2004-06-02 14:20:14
2004-06-02 14:38:09

but instead it produces:-

2004-06-02 14:20:14
2004-06-02 14:20:14

i.e. it repeats the first date.  If there are more than two xml items it 
repeats the same date all the way through.

Is this a known problem, and is there a fix?

David

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to