目前我有以下 XML:
<Rowsets>
<Rowset>
<Row>
<DrilldownDepth>0</DrilldownDepth>
<ScheduleWeek>---</ScheduleWeek>
<ABC>---</ABC>
<PQR>1500</PQR>
<XYZ>15000</XYZ>
<Quant>285</Quant>
</Row>
<Row>
<DrilldownDepth>1</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>---</ABC>
<PQR>1500</PQR>
<XYZ>15000</XYZ>
<Quant>285</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>SUPER</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>Duper</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>12</ScheduleWeek>
<ABC>Fun</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>7</ScheduleWeek>
<ABC>SUPER</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>7</ScheduleWeek>
<ABC>Duper</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
<Row>
<DrilldownDepth>2</DrilldownDepth>
<ScheduleWeek>8</ScheduleWeek>
<ABC>SUPER</ABC>
<PQR>100</PQR>
<XYZ>200</XYZ>
<Quant>300</Quant>
</Row>
</Rowset>
</Rowsets>
现在我只需要那些<Row>
where<DrilldownDepth>2</DrilldownDepth>
和 <ScheduleWeek>12</ScheduleWeek>
. 我可以使用中继器/循环来实现它,但我需要使用 Xpath 或 XSLT 来实现它。因此,我们将不胜感激对此事的任何帮助。
索茨