私のXMLは次のようなものです:
<?xml version="1.0" encoding="utf-8"?>
<Rowsets DateCreated="2012-08-01T17:43:31" EndDate="2012-08-01T17:43:03" StartDate="2012-08-01T16:43:03" Version="12.0.12 Build(9)">
<Rowset>
<Columns>
<Column Description="FirstName" MaxRange="1" MinRange="0" Name="Plant" SQLDataType="12" SourceColumn="Plant"/>
<Column Description="Lastname" MaxRange="1" MinRange="0" Name="Process" SQLDataType="12" SourceColumn="Process"/>
<Column Description="BorninMonth" MaxRange="1" MinRange="0" Name="ScheduleStartTimestamp" SQLDataType="93" SourceColumn="ScheduleStartTimestamp"/>
<Column Description="BorninWeek" MaxRange="1" MinRange="0" Name="PO" SQLDataType="4" SourceColumn="PO"/>
<Column Description="Phone" MaxRange="1" MinRange="0" Name="EquipmentName" SQLDataType="-1" SourceColumn="EquipmentName"/>
</Columns>
<Row>
<FirstName>Derek</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Michael</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>2</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Yang</FirstName>
<Lastname>Patel</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Bruke</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Maulik</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>2</BorninMonth>
<BorninWeek>2</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Montu</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>3</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>CHintu</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>4</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Pintu</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>4</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Puppy</FirstName>
<Lastname>Patel</Lastname>
<BorninMonth>4</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
<Row>
<FirstName>Tommy</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>5</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
</Row>
</Rowset>
ここで、1 か月目に生まれ、名前が Shah である人の数を調べたいと思います。同じく2月生まれで姓はシャー。月3で生まれ、姓はシャー。
したがって、出力 XML は次のようになります。
<?xml version="1.0" encoding="utf-8"?>
<Rowsets DateCreated="2012-08-01T17:43:31" EndDate="2012-08-01T17:43:03" StartDate="2012-08-01T16:43:03" Version="12.0.12 Build(9)">
<Rowset>
<Columns>
<Column Description="FirstName" MaxRange="1" MinRange="0" Name="Plant" SQLDataType="12" SourceColumn="Plant"/>
<Column Description="Lastname" MaxRange="1" MinRange="0" Name="Process" SQLDataType="12" SourceColumn="Process"/>
<Column Description="BorninMonth" MaxRange="1" MinRange="0" Name="ScheduleStartTimestamp" SQLDataType="93" SourceColumn="ScheduleStartTimestamp"/>
<Column Description="BorninWeek" MaxRange="1" MinRange="0" Name="PO" SQLDataType="4" SourceColumn="PO"/>
<Column Description="Phone" MaxRange="1" MinRange="0" Name="EquipmentName" SQLDataType="-1" SourceColumn="EquipmentName"/>
</Columns>
<Row>
<FirstName>Derek</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>3</CountMonth>
</Row>
<Row>
<FirstName>Michael</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>2</BorninWeek>
<Phone>925</Phone>
<CountMonth>3</CountMonth>
</Row>
<Row>
<FirstName>Yang</FirstName>
<Lastname>Patel</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>3</CountMonth>
</Row>
<Row>
<FirstName>Bruke</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>1</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>3</CountMonth>
</Row>
<Row>
<FirstName>Maulik</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>2</BorninMonth>
<BorninWeek>2</BorninWeek>
<Phone>925</Phone>
<CountMonth>1</CountMonth>
</Row>
<Row>
<FirstName>Montu</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>3</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>1</CountMonth>
</Row>
<Row>
<FirstName>CHintu</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>4</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>2</CountMonth>
</Row>
<Row>
<FirstName>Pintu</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>4</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>2</CountMonth>
</Row>
<Row>
<FirstName>Puppy</FirstName>
<Lastname>Patel</Lastname>
<BorninMonth>4</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>2</CountMonth>
</Row>
<Row>
<FirstName>Tommy</FirstName>
<Lastname>Shah</Lastname>
<BorninMonth>5</BorninMonth>
<BorninWeek>1</BorninWeek>
<Phone>925</Phone>
<CountMonth>1</CountMonth>
</Row>
</Rowset>
そのため、Month の値をインクリメントして行数をカウントするような XML を作成するには、助けが必要です。