JSFiddle - React, Tailwind, and code Playground

by mendesjuan

JavaScript

var txtBoxForm =
  '<doc>'+
    '<scripto src="http://ADDRESS"></scripto>'+
    '<noscript>' + 
      '<a href="http://ADDRESS" target="_blank">'+
        '<img src="http://ADDRESS" border="0" width="728" height="90" />'+
      '</a></noscript></doc>';

var parser = new DOMParser();
var xmlDoc = parser.parseFromString(txtBoxForm, "text/xml");

// outputs http://ADDRESS
console.log( xmlDoc.getElementsByTagName("scripto")[0].getAttribute("src") );
// outputs http://ADDRESS
console.log( xmlDoc.getElementsByTagName("img")[0].getAttribute("src") );