XML structure expressed in Xpath kind of
Records/Record/Actions/Action/ActionDate
the other node on the same level
Records/Record/Actions/Action/CTCDate
Is there easy or not easy way to sort it on "order by ActionDate,CTCDate" ( in SQL notation ), but per Actions for each selected Record ( not per XML file ) when we iterate somehow and generate sorted XML. File around 50M
Input
<Record>
<Name>Zywocinski, Cynthia A.</Name>
<Classification>Individual</Classification>
<CTType>Reciprocal</CTType>
<Addresses>
<Address>
<City>Lancaster</City>
<ZIP>01523</ZIP>
<Province/>
<State>MA</State>
<DUNS/>
</Address>
</Addresses>
<References>
<Reference>Zywocinski-White, Cynthia</Reference>
</References>
<Actions>
<Action>
<ActionDate>13-Oct-1999</ActionDate>
<TermDate>Indef.</TermDate>
<CTCode>Z1</CTCode>
<AgencyComponent>HHS</AgencyComponent>
<EPLSCreateDate>29-Jul-1999</EPLSCreateDate>
</Action>
<Action>
<ActionDate>13-Oct-1999</ActionDate>
<TermDate>Indef.</TermDate>
<CTCode>A1</CTCode>
<AgencyComponent>HHS</AgencyComponent>
<EPLSCreateDate>29-Jul-1999</EPLSCreateDate>
</Action>
<Action>
<ActionDate>20-Jul-1999</ActionDate>
<TermDate>Indef.</TermDate>
<CTCode>R</CTCode>
<AgencyComponent>OPM</AgencyComponent>
<EPLSCreateDate>29-Oct-1999</EPLSCreateDate>
</Action>
</Actions>
<Description/>
<AgencyIdentifiers/>
</Record>
Output
<Record>
<Name>Zywocinski, Cynthia A.</Name>
<Classification>Individual</Classification>
<CTType>Reciprocal</CTType>
<Addresses>
<Address>
<City>Lancaster</City>
<ZIP>01523</ZIP>
开发者_StackOverflow<Province/>
<State>MA</State>
<DUNS/>
</Address>
</Addresses>
<References>
<Reference>Zywocinski-White, Cynthia</Reference>
</References>
<Actions>
<Action>
<ActionDate>20-Jul-1999</ActionDate>
<TermDate>Indef.</TermDate>
<CTCode>R</CTCode>
<AgencyComponent>OPM</AgencyComponent>
<EPLSCreateDate>29-Oct-1999</EPLSCreateDate>
</Action>
<Action>
<ActionDate>13-Oct-1999</ActionDate>
<TermDate>Indef.</TermDate>
<CTCode>A1</CTCode>
<AgencyComponent>HHS</AgencyComponent>
<EPLSCreateDate>29-Jul-1999</EPLSCreateDate>
</Action>
<Action>
<ActionDate>13-Oct-1999</ActionDate>
<TermDate>Indef.</TermDate>
<CTCode>Z1</CTCode>
<AgencyComponent>HHS</AgencyComponent>
<EPLSCreateDate>29-Jul-1999</EPLSCreateDate>
</Action>
</Actions>
<Description/>
<AgencyIdentifiers/>
</Record>
精彩评论