Q

Tag question

If one enters a For-Each Select loop, telling it to look for two particular tags, completed by using the loop or function (tag1 | tag2), then if one wishes to have a particular function performed on just one on the tags, say tag1 -- How do you get the context from the For-Each loop -- as the tag1 and tag2 are no longer recognized unless they are nested within each other? So you would need to have to be able...

to complete a function on tag 2 but then it would also apply it to the outer tag1 as well.

Is there anyway of avoiding this?


It sounds like the function that needs to be performed on tag1 should be separated from the function to be performed on tag2. If there is commonality between the two pieces of code, the code can be factored into separate functions.

Removing the distinction between tag1 and tag2 is what is causing the problem here.


This was first published in February 2002

Dig deeper on XML and XML schema

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close