You use a hodgepodge of .split and .join like so to achieve the same effect.
var xml = "<foo><bar>Bar</bar><baz>Baz</baz><qux>Qux</qux></foo>";
var changeOne = xml.split("<").join("<");
var changeTwo = changeOne.split(">").join(">");
alert(changeTwo);
No comments:
Post a Comment