this is my xml:
</ROOT>
<Item Segment="COMFIN " Dept="Blackberr y" Category1="Acti ve Directory" Category2="Pass word Reset" Code="Reset" />
<Item Segment="GEHC" Dept="Remote Support" Category1="Hard ware" Category2="Cabl e" Code="Replace" />
<Item Segment="Plasti cs" Dept="Blackberr y" Category1="Soft ware" Category2="Casi ng" Code="Install" />
<Item Segment="Plasti cs" Dept="Remote Support" Category1="Hard ware" Category2="Casi ng" Code="Repair" />
<Item Segment="Plasti cs" Dept="Site Support" Category1="Hard ware" Category2="Part s & Vendor 5.0" Code="Replace" />
</ROOT>
this is my query:
"/ROOT/Item[@Dept='Site Support' and not(@Category1= preceding::Item/@Category1)]/@Category1"
returns nothing
for those of you that it isn't plain to see, i'm attempting to select all Item nodes that have a attrib of Dept/with value of Site Support, and also, the preceding nodes must not have duplicate category1 values.
then the query gets the category1 attribute nodes from the Item nodes.
This does not work correctly on this expression, but it does here:
"/ROOT/Item[@Dept='Blackber ry' and not(@Category1= preceding::Item/@Category1)]/@Category1"
returns active directory, and software
my assumption is that the reason that i get no results on the first query is that there is only one dept attribute with the site support value, and because of the way that i've formatted my query string, it removes the nodes that it finds in the first expression when it test's the second expression. that's my guess though..
any help? please?
</ROOT>
<Item Segment="COMFIN " Dept="Blackberr y" Category1="Acti ve Directory" Category2="Pass word Reset" Code="Reset" />
<Item Segment="GEHC" Dept="Remote Support" Category1="Hard ware" Category2="Cabl e" Code="Replace" />
<Item Segment="Plasti cs" Dept="Blackberr y" Category1="Soft ware" Category2="Casi ng" Code="Install" />
<Item Segment="Plasti cs" Dept="Remote Support" Category1="Hard ware" Category2="Casi ng" Code="Repair" />
<Item Segment="Plasti cs" Dept="Site Support" Category1="Hard ware" Category2="Part s & Vendor 5.0" Code="Replace" />
</ROOT>
this is my query:
"/ROOT/Item[@Dept='Site Support' and not(@Category1= preceding::Item/@Category1)]/@Category1"
returns nothing
for those of you that it isn't plain to see, i'm attempting to select all Item nodes that have a attrib of Dept/with value of Site Support, and also, the preceding nodes must not have duplicate category1 values.
then the query gets the category1 attribute nodes from the Item nodes.
This does not work correctly on this expression, but it does here:
"/ROOT/Item[@Dept='Blackber ry' and not(@Category1= preceding::Item/@Category1)]/@Category1"
returns active directory, and software
my assumption is that the reason that i get no results on the first query is that there is only one dept attribute with the site support value, and because of the way that i've formatted my query string, it removes the nodes that it finds in the first expression when it test's the second expression. that's my guess though..
any help? please?
Comment