XMLDocument(string) vs XMLDocument2()

divvi_vamsi
Mega Expert

How are the above functions different? When should we use each of them?

Thanks
Divya

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

Hi Divya,



The XMLDocument Script Object is a JavaScript Object wrapper for parsing and extracting XML data from an XML document (String).



and, XMLDocument2()


Instantiates an XMLDocument object.


Parameters:


  • None


Regards,


Sachin


Shishir Srivast
Mega Sage

Please let us know if you are looking for any specific scenario?


justinbayliss
Tera Expert

One difference is XMLDocument2 is designed to work with scoped apps, as XMLDocument is not.