getXML() vs getXMLAnswer()? which is the best to use?

mallikharjunasw
Tera Contributor

getXML() vs getXMLAnswer()? which is the best to use?

1 ACCEPTED SOLUTION

Chris M3
Tera Guru

 

getXMLAnswer() saves you a line of code every time you use it.  That is it.  There shouldn't be any noticeable difference in speed, though this method is probably guaranteed to be slightly slower as it runs at least one more line of code each time.  So ease of use vs minuscule difference in speed. 

with getXMLAnswer() uou no longer need this line of code.

var comments = response.responseXML.documentElement.getAttribute("answer");

View solution in original post

10 REPLIES 10

Snehal Pawar
Tera Expert

Hi,

getXML() is the best to use.

 

Thanks,

Snehal.

 

Rajneesh Pande1
Kilo Expert

getXML() is best to use if you want fast performance.

 

Please mark it helpful.

Thanks

Rajneesh

Chris M3
Tera Guru

 

getXMLAnswer() saves you a line of code every time you use it.  That is it.  There shouldn't be any noticeable difference in speed, though this method is probably guaranteed to be slightly slower as it runs at least one more line of code each time.  So ease of use vs minuscule difference in speed. 

with getXMLAnswer() uou no longer need this line of code.

var comments = response.responseXML.documentElement.getAttribute("answer");