I think you can improve this.

* First, you have a lot of unnecessary variables here: `xmlLayerList`, `xmlLayerListClean`, and `layerList`. You could just use 1 var and update its value.
* `xmlLayerList` is a bad name for this variable, because it leads the reader to think that the variable is a `list/array`--but it's not. It's a string. I would just all it `layerName`.
* These replace calls can be shortened to a single line, since each `replace` call just returns a string. So you can chain them together like this:

<pre>
var layerName = (new XMLSerializer()).serializeToString(layerName[i]);
layerName = layerName.replace('&lt;Name&gt;', '').replace('&lt;/Name&gt;', '');
</pre>

That said, there is an even cleaner way of extracting the name from the HTML. (Note: When dealing with XML/HTML, it is always best to use a utility which includes a bona fide XML parser. The JavaScript standard library has one built in, and jQuery works well too.) So a further revision of the code might look something like this:
<pre>
var layerNameHTML = (new XMLSerializer()).serializeToString(layerName[i]);
var layerName = $(layerNameHTML).text();
</pre>