[Home] [By Thread] [By Date] [Recent Entries]

Subject: Child nodes with same name
From: "Jacqui Moore" <jacquimoore1@xxxxxxxxxxx>
Date: Fri, 5 Nov 2004 15:10:16 -0000
Hi,

I have an xml file - shortened version of it is:

<ControlledList>
<Item Id="160" ConceptId="160" Category="true">
  <Name>Deaths</Name>
  <ScopeNotes/>
</Item>
<Item Id="161" ConceptId="161" Category="true">
  <Name>Bereavement</Name>
  <ScopeNotes/>
  <BroaderItem Id="891" ConceptId="891" Default="false">General support
care</BroaderItem>
  <BroaderItem Id="160" ConceptId="160" Default="true">Deaths</BroaderItem>
 </Item>
<Item Id="161" ConceptId="161" Category="true">
  <Name>Burials</Name>
  <ScopeNotes/>
  <BroaderItem Id="160" ConceptId="160" Default="true">Deaths</BroaderItem>
 </Item>
</ControlledList>

With this pattern, I need to match any BroaderItem childnodes that match the
expression:

Expression = "Deaths"
selectPattern = "ControlledList/Item[BroaderItem='" & expression &"' &&
@Category='true']"
SET oChildren = objXML.selectNodes(selectPattern)

The problem is that unless the BroaderItem childnode that I am looking for
is the first BroaderItem childnode, it does not return it. So if I am
searching for all nodes that has the childnode BroaderItem matching
'Deaths', then this pattern only brings back Burials and not Bereavement as
it should. Any ideas?

Thanks,
Jacqui

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member