If one enters a For-Each Select loop, telling it to look for two particular tags, completed by using the loop or...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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
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.
Dig Deeper on XML and XML schema
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.