Hi Ram2010mech,
Firstly if you want to just compare the all xml tag values you can simply use a xml comparison assertion.
If by any means that doesn't solve your problem, then
you can create functions for individual tasks and call the according. creating functions in a java script step is more over similar with
example:
add( int a, int b)
{
return a+b;
}
sub( int a, int b)
{
return a-b;
}
return add(5,15);
You can also write separate Java scripts steps or create sub processes by providing input parameters.
for more info on subprocess refer below
https://docops.ca.com/devtest-solutions/10-1/en/using/using-ca-application-test/using-devtest-workstation-with-ca-application-test/building-test-cases/building-subprocesses
Thanks,
Venkatesh