Fewer Rows from the XML depending upon the condition

poliuyn

New Member
Currently I have following XML:\[code\]<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>\[/code\]Now I need only those \[code\]<Row>\[/code\] where \[code\]<DrilldownDepth>2</DrilldownDepth>\[/code\] and \[code\]<ScheduleWeek>12</ScheduleWeek>\[/code\]. I can achieve it using a repeater/loop but I need to achieve it using either Xpath or XSLT. So any help inthis matter will be appreciated.Sots
 
Back
Top