I sort of can. Here is a mock up of the entire file. It has db connections for my job so I can't post the actual connection string info but the file is in this exact structure I just changed the values to generic values.
I thought this would be easier so I apologize for not saying exactly what I am trying to do. In order to be less confusing let me explain what I ultimately want to accomplish.
I have a soapui project that reads in the file and I want to add a groovy script that determines the current active environment (I have 2 test and sandbox) and then runs some logic that says if the active environment = "test" then grab all connection values under the <envname> of "test" and then set them to a property using the <connname> + <host> or <port> etc.
Then I have jdbc test steps that I configure to connect using the values I want out of the properties test step. I am already kind of doing this but my groovy script keeps getting larger every time I have to add a new connection so what I want to be able to do is to just grab all connections out of the external file that fall under a specific <envname> but I keep having trouble counting the child nodes.
I hope this makes sense if needed I could mock up a soapui project of what I am currently doing.
Thanks Rao