Documentation for GlideXML objects?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2013 07:04 AM
We have a need to parse XML data in some of our javascripts.
I have seen a few references in the wiki to glide helpers such as GlideXMLUtil and GlideXMLDocument in various code samples.
Is there any documentation that provides descriptions of the available methods and parameters for the GlideXML objects?
Thanks in advance,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2013 08:37 AM
NO!!! Don't use GlideXMLDocument. There is an awesome utility I would recommend called XMLHelper, use these,if your purpose is to parse XML,
Before you ask, yes this is on Server Side.
http://community.servicenow.com/blog/slightlyloony/take-deep-breath
http://wiki.servicenow.com/index.php?title=XMLHelper
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2013 09:15 AM
In addition to XMLHelper mentioned by adiddigi, I like to use the XMLDocument Script Include. It allows me to use XPATH statements to query any part of an XML document. It is very handy.
I, too, would avoid GlideXMLDocument as it is not an "official" servicenow API and could change in the future.
The following link shows how to handle a SOAP response, which is just an XML response. It should be handy for you to see how to use XMLDocument:
http://www.john-james-andersen.com/blog/service-now/tutorial-handling-a-soap-response-in-servicenow.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2013 06:41 PM
Both script includes provide the functionality we were looking for and the code is clear enough that formal documentation is not really needed. Thanks again.