What is GlideXMLUtil()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2015 02:52 AM
Dear Friends,
Below is some portion cut from the script which is used to receive XML data from external party. I am able to understand "XMLDocument" which is a script include and we are calling functions define inside it. But i am not able to understand GlideXMLUtil()?? Below script is using "xmlUtil.getChildByTagName", but i can not find "getChildByTagName" function anywhere in ServiceNow?? Can you please tell what is GlideXMLUtil() and where i can see this in SN and where i can see functions defined inside it?
var xmldoc = new XMLDocument(soapRequestXML);
var xmlUtil = new GlideXMLUtil(); //old Packages.com.glide.util.XMLUtil();
var nodelist = xmldoc.getNodes("//extendedfield");
for (var i=0; i < nodelist.getLength(); i++) {
var parent_node = nodelist.item(i);
var name_element = xmlUtil.getChildByTagName(parent_node, "name") ;
var name_node = xmlUtil.getAllText(name_element);
Thanks
Ramandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2016 09:49 PM
Hi Ramandeep,
Not sure if you got an answer for this yet, but GlideXMLUtil is a Glide scriptable object. You can find it the following list.
Packages Call Replacement Script Objects - ServiceNow Wiki
Unfortunately, there is no documentation of the available methods. Additionally, the wiki article has the following note so I would recommend using documented options when possible.
----------------------------------------------------------------------------------------------------------------------------
Note: The publication of this list does not imply that these scriptable objects are for use by customers, consultants, and partners. The use of theGlide prefix does not imply that these scriptable objects are in the same category as or have the same status as objects such as GlideRecord. Except where documentation is provided elsewhere on the ServiceNow Wiki, these undocumented APIs are not intended for general use, and ServiceNow, Inc., does not make any commitment to document them, answer questions about them, or maintain them indefinitely in their current form. Over time, ServiceNow, Inc., intends to migrate a subset of the functionality represented by these objects into the documented API and remove the rest.
----------------------------------------------------------------------------------------------------------------------------
Help this helps!
-Jose