Wayne, You can use an XPath expression like "//RuleTemplate/RuleDefinition" to select RuleDefinition nodes, but only those that have a RuleTemplate parent node. Take a look at the CachedXPathAPI or XPathAPI classes and the selectNodeList() method.
-- fas F. Andy Seidl, Co-founder MyST Technology Partners Creators of MySmartChannels ________________________________________ From: Wayne Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 10:17 AM To: xerces-j-user Subject: Searching for elements without decending into children I have an XML structure where a specific element is referenced at two levels of the same tree: <RuleTemplate> <RuleDefinition/> <ConcreteRule> <RuleDefinition/> </ConcreteRule> </RuleTemplate> I'd like to search for all the RuleDefinitions that are children of RuleTemplate, but not the one in ConcreteRule. The XML maps to the object structures so changing things is not an option. Up till now I was using getElementsByTagNamegetElementsByTagName, but recently realized it wasn't doing what I thought. I would have suspected that DOM would have another way to do this, but haven't found any, short of doing it by hand. Since my interface specifies a NodeList, which I haven't figured out how to edit, I'm kind of stuck. Any suggestions? Thanks. --- Wayne Johnson, | There are two kinds of people: Those 3943 Penn Ave. N. | who say to God, "Thy will be done," Minneapolis, MN 55412-1908 | and those to whom God says, "All right, (612) 522-7003 | then, have it your way." --C.S. Lewis ________________________________________ Do you Yahoo!? vote.yahoo.com - Register online to vote today! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]