how to get xml joint value and output in groovy
i have a xml
'''<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://abc" > <Cool Type="abc" > </Cool> <Cool Type="abk" >
<Line LineID="0" Main="1"> <Info updateDate="17-05-2028" > <Selection Tag="A" Status="Offer"/> <Selection Tag="A" Status="Offer"/> <Selection Tag="A" Status="Offer"/> </Info> </Line> </Cool> <Cool Type="abg" >
<Line LineID="0" Main="1"> <Info updateDate="17-05-2028" > <Selection Tag="C" Status="Offer"/> <Selection Tag="B" Status="Offer"/> <Selection Tag="B" Status="Offer"/> </Info> </Line> </Cool> <Cool Type="abg" > <Line LineID="0" Main="1"> <Info updateDate="17-05-2028" > <Selection Tag="A" Status="Offer"/> <Selection Tag="A" Status="Offer"/> <Selection Tag="B" Status="Offer"/> </Info> </Line> </Cool> <Cool Type="abg" > <Line LineID="0" Main="1"> <Info updateDate="17-05-2028" > <Selection Tag="A" Status="Offer"/> <Selection Tag="A" Status="Offer"/> <Selection Tag="A" Status="Offer"/> </Info> </Line> </Cool> </SOAP-ENV:Envelope> '''
I want to get Cool Type ='abg' and Selection Tag="A" then output value ='A' what should i do?
I try to using this script but only can get Type='abg' or Tag='A' I want Joint these Attributes then output attributes
def res = '''
''' xml = new XmlParser().parseText(res) results = xml.'**'.findAll { it.@Type == 'abg' } results.each { log.info(it.@Type) }
I want to log.info (@Tag )
I try to results = xml.'**'.findAll { it.@Type == 'abg' && it.@Tag== 'A'}
resuluts.each{
log.info(it.@Tag)
}
but it only log @Tag=A, No log @Type==abg > @Tag=A *-*
HarryS,
When Collaborator is initially installed, it uses the local loopback address of the machine it was installed on. To resolve your issue, you need to specify an "External URL:" for the server. This is done in the Admin > System > Settings form. You can use the network accessible IP address of the Collaborator server, or a qualified DNS mapping if you have that setup.
Ensure to also use the port setting with your IP address.
Here is a link to the documentation on that setting:
Cheers,
Mel