This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class XMLHelper { | |
static isValid(xmlDocument) { | |
return (xmlDocument && !xmlDocument.getElementsByTagName('parsererror').length); | |
} | |
static deserialize(xmlString) { | |
return (new DOMParser()).parseFromString(xmlString, "application/xml"); | |
} | |
static serialize(xmlDocument) { | |
return (new XMLSerializer()).serializeToString(xmlDocument); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**** | |
* fetching all pages of search result ... | |
* Node JS tryouts.... | |
* https://repl.it/@teswar/fetchallpagesofjsonmocksearchresult | |
************/ | |
const https = require('https'); | |
/* | |
* compose url with query params appended... |