login about faq

Hi all,

I would like to ask if there is possible for multiple conditions search by the method of SearchForAttribute. (in Chilkat v9.5.0)

After reading the example, I found that there is only one condition for the search such as

' Search for all "fruit" nodes having a color attribute ' where the name of the color ends in "e"; xFound = xSearchRoot.SearchForAttribute(xBeginAfter,"fruit","color","*e")

Here is my sample code:

  <Table code="101" section="1" status="0" />
  <Table code="102" section="1" status="1" />
  <Table code="201" section="2" status="0" />
  <Table code="202" section="2" status="0" />
  <Table code="301" section="3" status="1" />
  <Table code="302" section="3" status="1" />

I would like to search the table for both conditions of "section in (1,2) AND status=1"

Thanks to advise.

asked Jul 27 '17 at 05:11

Siupo's gravatar image


It appears you'll need to use the SearchForAttribute twice. Once on the original object, then once on the object returned from the first search.


answered Jul 27 '17 at 11:44

TracyP's gravatar image


I would recommend iterating over the direct children of the "Tables" element and then checking the attribute values of each.


answered Aug 09 '17 at 12:02

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jul 27 '17 at 05:11

Seen: 1,254 times

Last updated: Aug 09 '17 at 12:02

powered by OSQA