<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Javascript on Aby George A</title><link>https://abygeorgea.com/categories/javascript/</link><description>Recent content in Javascript on Aby George A</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 21 Jul 2017 06:09:53 +1000</lastBuildDate><atom:link href="https://abygeorgea.com/categories/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>Extracting Substring using Javascript</title><link>https://abygeorgea.com/blog/2017/07/21/extracting-substring-using-javascript/</link><pubDate>Fri, 21 Jul 2017 06:09:53 +1000</pubDate><guid>https://abygeorgea.com/blog/2017/07/21/extracting-substring-using-javascript/</guid><description>&lt;p&gt;In previous blogs &lt;a href="https://abygeorgea.com/blog/2017/04/27/stubbing-xml-responses-using-mountebank/"&gt;here&lt;/a&gt; , I have explained how we return a XML response using mountebank. However , most of the time, we will have to make some modification to the template response before returning a response. Say for example, we may have to replace details like timestamp, or use an input from request parameter and update that in response etc.&lt;/p&gt;
&lt;p&gt;One of the easiest way to do this without using other frameworks like xml2js etc is to extract the substring between the node values and replace it . Below is a code snippet which will help to achieve this&lt;/p&gt;</description></item></channel></rss>