<?xml version="1.0" encoding="utf-8"?>
<Holidays>
<Holiday1>1/30/2014</Holiday1>
<Holiday2>2/25/2014</Holiday2>
<Holiday3>3/3/2014</Holiday3>
<Holiday4>4/24/2014</Holiday4>
<Holiday5>5/25/2014</Holiday5>
<Holiday6>6/22/2014</Holiday6>
<Holiday7>7/4/2014</Holiday7>
<Holiday8>8/13/2014</Holiday8>
<Holiday9>9/15/2014</Holiday9>
<Holiday10>11/27/2014</Holiday10>
<Holiday11>12/24/2014</Holiday11>
<Holiday12>12/25/2014</Holiday12>
</Holidays>
|
In addition to xpath expression, we also can use the descendant expression to match each holiday entry.
Frist, create a variable to match the beginning part of expression
Make the increment of holiday number, then use “strHoliday” as the last part of the descendant expression
Finally, combine two parts into an complete expression
Search on specific xml document
download this script:
https://drive.google.com/file/d/0B5tzzJsbkWkIWDdkNTk5ZC0tYnM/edit?usp=sharing
No comments:
Post a Comment